view: stable single type view ::each(cb) function

This commit is contained in:
Michele Caini
2023-04-28 14:20:45 +02:00
parent 3b8d82330d
commit 17dc061490
2 changed files with 8 additions and 0 deletions

View File

@@ -94,10 +94,16 @@ TEST(SingleComponentView, InvalidView) {
ASSERT_EQ(iterable.begin(), iterable.end());
ASSERT_EQ(iterable.cbegin(), iterable.cend());
view.each([](const int &) { FAIL(); });
view.each([](const entt::entity, const int &) { FAIL(); });
entt::storage<int> storage;
view.storage(storage);
ASSERT_TRUE(view);
view.each([](const int &) { FAIL(); });
view.each([](const entt::entity, const int &) { FAIL(); });
}
TEST(SingleComponentView, Constructors) {