#include #include #include struct a_type {}; struct another_type {}; TEST(Identifier, Uniqueness) { using id = entt::identifier; constexpr a_type an_instance; constexpr another_type another_instance; ASSERT_NE(id::type, id::type); ASSERT_EQ(id::type, id::type); ASSERT_NE(id::type, id::type); ASSERT_EQ(id::type, id::type); ASSERT_EQ(id::type, id::type); // test uses in constant expressions switch(id::type) { case id::type: FAIL(); case id::type: SUCCEED(); } } TEST(Identifier, SingleType) { using id = entt::identifier; std::integral_constant> ic; (void)ic; }