Chapter 3. Associative Containers
Somewhat like the polychromatic horse in The Wizard of Oz movie, the associative containers are creatures of a different color. True, they share many characteristics with the sequence containers, but they differ in a number of fundamental ways. For example, they automatically keep themselves sorted; they view their contents through the lens of equivalence instead of equality; set
s and map
s reject duplicate entries; and map
s and multimap
s generally ignore half of each object they contain. Yes, the associative containers are containers, but if you’ll excuse my likening vector
s and string
s to Kansas, we are definitely not in Kansas any more.
In the Items that follow, I explain the critical notion of equivalence, ...
Get Effective STL 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.