You can use boost::multi_index to create a bidirectional map – you can use either value of the pair as a key to do a quick lookup.
More Related Contents:
- Find mapped value of map
- How to correctly implement custom iterators and const_iterators?
- Using char* as a key in std::map
- How to find the index of current object in range-based for loop?
- What is the most effective way to get the index of an iterator of an std::vector?
- Vector erase iterator
- How to use an iterator?
- Removing item from vector while iterating?
- Iterating C++ vector from the end to the beginning
- What is the difference between const_iterator and non-const iterator in the C++ STL?
- What is the preferred/idiomatic way to insert into a map?
- Where can I get a copy of the file libstdc++.so.6.0.15 [closed]
- Custom Iterator in C++
- std::map default value
- std::map default value for build-in type
- Thread safety of std::map for read-only operations
- Are non dereferenced iterators past the “one past-the-end” iterator of an array undefined behavior?
- How to remove constness of const_iterator?
- Why does std::map operator[] create an object if the key doesn’t exist?
- How to avoid code duplication implementing const and non-const iterators?
- Can I increment an iterator by just adding a number?
- Erasing vector::end from vector
- std::map thread-safety
- Get a reverse iterator from a forward iterator without knowing the value type
- Using an iterator to Divide an Array into Parts with Unequal Size
- How to increment an iterator by 2?
- Types of iterator : Output vs. Input vs. Forward vs. Random Access Iterator
- Contiguous iterator detection
- How to erase & delete pointers to objects stored in a vector?
- How can I copy one map into another using std::copy?