diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 3e2a7e61e..3b2324ac0 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -176,7 +176,7 @@ class ENTT_API meta_node { nullptr, nullptr, 0u, - [](typename meta_ctor_node::size_type) ENTT_NOEXCEPT -> meta_type_node * { return nullptr; }, + nullptr, [](meta_any * const) { return meta_any{std::in_place_type}; } }; diff --git a/test/entt/meta/meta_ctor.cpp b/test/entt/meta/meta_ctor.cpp index 547500a0a..27724682d 100644 --- a/test/entt/meta/meta_ctor.cpp +++ b/test/entt/meta/meta_ctor.cpp @@ -221,6 +221,7 @@ TEST_F(MetaCtor, ImplicitlyGeneratedDefaultConstructor) { // default constructor is implicitly generated ASSERT_EQ(counter, 1); ASSERT_TRUE(type.ctor<>()); + ASSERT_EQ(type.ctor<>().arg(0), entt::meta_type{}); auto any = type.ctor<>().invoke();