Ordered Associative Container
Overview
The ordered associative container std::map
and std::multimap
associate their key with a value. Both are defined in the header <map>
. std::set
and std::multiset
need the header <set>
. This Table gives you the details.
All four ordered containers are parametrised by their type, their allocator and their comparison function. The containers have default values for the allocator and the comparison function, depending on the type. The declaration of std::map
and std::set
shows this very nicely.
The declaration of both associative containers shows that std::map
has an associated value. The key and the value are used for the default allocator: allocator<pair<const key, val...