Several times in a year, we need something that may store and index a pair of values. Moreover, we need to get the first part of the pair using the second, and get the second part using the first. Confused? Let me show you an example. We create a vocabulary class. When the users put values into it, the class must return identifiers, and when the users put identifiers into it, the class must return values.
To be more practical, users are putting login names in our vocabulary and wish to get the unique identifier out of it. They also wish to get all the logins for an identifier.
Let's see how it can be implemented using Boost.