diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index e451de55b..ed6dc071d 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -167,7 +167,9 @@ class meta_any { using vtable_type = void(const internal::meta_traits op, const bool, const meta_any &, void *); template - static std::enable_if_t>, Type>> basic_vtable([[maybe_unused]] const internal::meta_traits req, [[maybe_unused]] const bool const_only, [[maybe_unused]] const meta_any &self, [[maybe_unused]] void *other) { + static void basic_vtable([[maybe_unused]] const internal::meta_traits req, [[maybe_unused]] const bool const_only, [[maybe_unused]] const meta_any &self, [[maybe_unused]] void *other) { + static_assert(std::is_same_v>, Type>, "Invalid type"); + if constexpr(is_meta_pointer_like_v) { if(req == internal::meta_traits::is_meta_pointer_like) { if constexpr(std::is_function_v::element_type>) {