Bladeren bron

test: I am the winner of the best error message ever but I remain humble :)

Michele Caini 4 jaren geleden
bovenliggende
commit
a98000cf3b
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      test/entt/entity/registry.cpp

+ 2 - 2
test/entt/entity/registry.cpp

@@ -1875,8 +1875,8 @@ TEST(Registry, RuntimePools) {
     static_assert(std::is_same_v<decltype(registry.storage("other"_hs)->second), typename entt::storage_traits<entt::entity, empty_type>::storage_type::base_type &>);
     static_assert(std::is_same_v<decltype(registry.storage("other"_hs)->second), typename entt::storage_traits<entt::entity, empty_type>::storage_type::base_type &>);
     static_assert(std::is_same_v<decltype(std::as_const(registry).storage("other"_hs)->second), const typename entt::storage_traits<entt::entity, empty_type>::storage_type::base_type &>);
     static_assert(std::is_same_v<decltype(std::as_const(registry).storage("other"_hs)->second), const typename entt::storage_traits<entt::entity, empty_type>::storage_type::base_type &>);
 
 
-    ASSERT_DEATH(auto &&unused = registry.storage<int>("other"_hs), "");
-    ASSERT_DEATH(auto &&unused = std::as_const(registry).storage<int>("other"_hs), "");
+    ASSERT_DEATH(registry.storage<int>("other"_hs), "");
+    ASSERT_DEATH(std::as_const(registry).storage<int>("other"_hs), "");
 
 
     ASSERT_NE(registry.storage("other"_hs), registry.storage().end());
     ASSERT_NE(registry.storage("other"_hs), registry.storage().end());
     ASSERT_EQ(std::as_const(registry).storage("rehto"_hs), registry.storage().end());
     ASSERT_EQ(std::as_const(registry).storage("rehto"_hs), registry.storage().end());