at() function to retrieve reference within bidirectional map

This commit is contained in:
Nav
2021-12-27 23:59:59 +00:00
parent 56894a2bf7
commit 7e76503969

View File

@@ -60,6 +60,14 @@ namespace Bloom
return output; return output;
} }
const TypeB& at(TypeA key) const {
return this->map.at(key);
}
const TypeA& at(TypeB key) const {
return this->flippedMap.at(key);
}
std::unordered_map<TypeA, TypeB> getMap() { std::unordered_map<TypeA, TypeB> getMap() {
return this->map; return this->map;
} }