registry:: non-template storage(id) returns an iterator rather than a naked pointer

This commit is contained in:
Michele Caini
2022-01-19 12:15:22 +01:00
parent 2ad3e0ed4c
commit 2196db562e
3 changed files with 26 additions and 25 deletions

View File

@@ -56,8 +56,8 @@ TEST(Example, DifferentRegistryTypes) {
registry.emplace<char>(src, 'c');
for(auto [id, storage]: registry.storage()) {
if(auto *pool = other.storage(id); pool && storage.contains(src)) {
pool->emplace(dst, storage.get(src));
if(auto it = other.storage(id); it != other.storage().end() && storage.contains(src)) {
it->second.emplace(dst, storage.get(src));
}
}