#include #include #include #include #include template struct entt::storage_type { // no signal regardless of component type ... using type = basic_storage; }; template struct entt::storage_type { // ... unless it's char, because yes. using type = sigh_storage_mixin>; }; template struct has_on_construct: std::false_type {}; template struct has_on_construct::on_construct)>>: std::true_type {}; template inline constexpr auto has_on_construct_v = has_on_construct::value; TEST(Example, SignalLess) { // invoking registry::on_construct is a compile-time error static_assert(!has_on_construct_v); static_assert(has_on_construct_v); entt::registry registry; const entt::entity entity[1u]{registry.create()}; // literally a test for storage_adapter_mixin registry.emplace(entity[0], 0); registry.erase(entity[0]); registry.insert(std::begin(entity), std::end(entity), 3); registry.patch(entity[0], [](auto &value) { value = 42; }); ASSERT_EQ(registry.get(entity[0]), 42); }