24 Apr
2007
24 Apr
'07
7:22 a.m.
Travis Parks wrote:
I have always been interested in a data structure for storing pairs of of keys. In math it is a one-to-one mapping. I find it useful from time to time to have a container that allows me to treat it like an enum, but then to do the operation the other way. I usually do it lazily and just do a map and then do a linear search for the value when I need to.
Look at http://www.boost.org/libs/multi_index/doc/index.html this does all you want. John.