Chapter 6. Bimap and Multi-index Containers

The Standard Library has ordered and unordered associative containers for storing objects and looking them up efficiently using some key. The key could be a text type, numeric type, or first-class objects. For ordered containers such as std::set and std::map, the keys must have a well-defined ordering relation that allows any set of keys to be sorted. For unordered containers, it must be possible to compute an integer hash value for each key, and additionally, determine whether any two keys are equivalent for some definition of equivalence. The key represents an index or criterion for lookup, and all the Standard Library associative containers support lookup using only a single criterion. In other words, ...

Get Learning Boost C++ Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.