Namespaces
Variants
Views
Actions

std::map

From cppreference.com
< cpp‎ | container
Revision as of 12:31, 10 November 2011 by Cubbi (Talk | contribs)

Template:cpp/container/map/sidebar

Defined in header <map>
template<

    class Key,
    class T,
    class Compare = std::less<Key>,
    class Allocator = std::allocator<std::pair<const Key, T> >

> class map;

Map is an associative container that contains a sorted list of unique key-value pairs. That list is sorted using the comparison function Compare applied to the keys. Search, removal, and insertion operations have logarithmic complexity. Maps are usually implemented as red-black trees.

Contents

Member types

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list end

Member classes

Template:cpp/container/dcl list value compare

Member functions

Template:cpp/container/dcl list constructorTemplate:cpp/container/dcl list destructorTemplate:cpp/container/dcl list operator=Template:cpp/container/dcl list get allocatorTemplate:cpp/container/dcl list atTemplate:cpp/container/dcl list operator atTemplate:cpp/container/dcl list beginTemplate:cpp/container/dcl list endTemplate:cpp/container/dcl list rbeginTemplate:cpp/container/dcl list rendTemplate:cpp/container/dcl list emptyTemplate:cpp/container/dcl list sizeTemplate:cpp/container/dcl list max sizeTemplate:cpp/container/dcl list clearTemplate:cpp/container/dcl list insertTemplate:cpp/container/dcl list emplaceTemplate:cpp/container/dcl list emplace hintTemplate:cpp/container/dcl list eraseTemplate:cpp/container/dcl list swapTemplate:cpp/container/dcl list countTemplate:cpp/container/dcl list findTemplate:cpp/container/dcl list equal rangeTemplate:cpp/container/dcl list lower boundTemplate:cpp/container/dcl list upper boundTemplate:cpp/container/dcl list key compTemplate:cpp/container/dcl list value comp
Element access
Iterators
Capacity
Modifiers
Lookup
Observers

Non-member functions

Template:cpp/container/dcl list operator compTemplate:cpp/container/dcl list swap2