14 Apr
2015
14 Apr
'15
12:01 p.m.
On Tue, Apr 14, 2015 at 4:26 AM, David Hagood
Several times I have run into a use case where I have some object that I would like to access via something like a std::map<>, but which already contains a member that I would like to use as a key. Is there any data structure that "acts like a map", but instead of storing std::pair
allows me to store an object directly, and specify what member of that object is the key value?
You want Boost.MultiIndex: http://www.boost.org/doc/libs/release/libs/multi_index/doc/index.html