meta: review + tests (code coverage) for implicitly generated default constructors

This commit is contained in:
Michele Caini
2021-01-22 15:17:58 +01:00
parent b005971427
commit cd929d8e65
2 changed files with 2 additions and 1 deletions

View File

@@ -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<Type>}; }
};

View File

@@ -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();