Sfoglia il codice sorgente

added a static_assert in a test to suppress a warning from GCC

Michele Caini 6 anni fa
parent
commit
be3597524f
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      test/entt/entity/registry.cpp

+ 1 - 0
test/entt/entity/registry.cpp

@@ -1133,6 +1133,7 @@ TEST(Registry, CreateManyEntitiesWithComponentsAtOnce) {
     registry.destroy(registry.create());
     registry.destroy(registry.create());
 
 
     const auto [iptr, cptr, eptr] = registry.create<int, char, empty_type>(std::begin(entities), std::end(entities));
     const auto [iptr, cptr, eptr] = registry.create<int, char, empty_type>(std::begin(entities), std::end(entities));
+    static_assert(std::is_same_v<typename decltype(eptr)::reference, empty_type>);
 
 
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<int>());
     ASSERT_FALSE(registry.empty<char>());
     ASSERT_FALSE(registry.empty<char>());