Standard C++ Library Class Reference
// Observers
key_compare key_comp() const;
value_compare value_comp() const;
// Map operations
iterator find (const key_value&);
const_iterator find (const key_value&) const;
size_type count (const key_type&) const;
iterator lower_bound (const key_type&);
const_iterator lower_bound (const key_type&) const;
iterator upper_bound (const key_type&);
const_iterator upper_bound (const key_type&) const;
pair<iterator, iterator> equal_range (const key_type&);
pair<const_iterator, const_iterator>
equal_range (const key_type&) const;
};
// Non-member Map Operators
template <class Key, class T, class Compare, class Allocator>
bool operator== (const map<Key, T, Compare, Allocator>&,
const map<Key, T, Compare, Allocator>&);
template <class Key, class T, class Compare, class Allocator>
bool operator< (const map<Key, T, Compare, Allocator>&,
const map<Key, T, Compare, Allocator>&);
// Specialized Algorithms
template <class Key, class T, class Compare, class Allocator>
void swap (map<Key,T,Compare,Allocator>&,
map<Key,T,Compare,Allocator>&);
Constructors and Destructors
explicit map (const Compare& comp = Compare (),
const Allocator& alloc = Allocator());
Default constructor. Constructs an empty map that will use the relation comp to order
keys, if it is supplied. The map will use the allocator alloc for all storage management.
template <class InputIterator>
map (InputIterator first, InputIterator last,
const Compare& comp = Compare (),
const Allocator& alloc = Allocator());
Constructs a map containing values in the range [first, last). Creation of the new map is
only guaranteed to succeed if the iterators first and last return values of type pair<class
Key, class Value> and all values of Key in the range[first, last) are unique. The map will
use the relation comp to order keys, and the allocator alloc for all storage management.
map (const map<Key,T,Compare,Allocator>& x);