Standard C++ Library Class Reference

size_type
max_size() const;
Returns the maximum possible size of the map. This size is only constrained by the
number of unique keys which can be represented by the type Key.
size_type
size() const;
Returns the number of elements in the map.
void swap (map<Key, T, Compare, Allocator>& x);
Swaps the contents of the map x with the current map, *this.
iterator
upper_bound (const key_type& x);
Returns a reference to the first entry with a key less than or equal to x.
const_iterator
upper_bound (const key_type& x) const;
Same as upper_bound above but returns a const_iterator.
value_compare
value_comp () const;
Returns a function object capable of comparing pair<const Key, T> values using the
comparison operation, Compare, of the current map. This function is identical to
key_comp for sets.
Non-member Operators
template <class Key, class T, class Compare, class Allocator>
bool operator== (const map<Key, T, Compare, Allocator>& x,
const map<Key, T, Compare, Allocator>& y);
Returns true if all elements in x are element-wise equal to all elements in y, using
(T::operator==). Otherwise it returns false.
template <class Key, class T, class Compare, class Allocator>
bool operator< (const map<Key, T, Compare, Allocator>& x,
const map<Key, T, Compare, Allocator>& y);
Returns true if x is lexicographically less than y. Otherwise, it returns false.
template <class Key, class T, class Compare, class Allocator>
void swap (map<Key, T, Compare, Allocator>& a,
map<Key, T, Compare, Allocator>& b);
Efficiently swaps the contents of a and b.