Difference between revisions of "cpp/container/set"
From cppreference.com
(regularizing its name) |
(The standard does not mention emplace in the definition of std::set (g++ for example does not provide it either).) |
||
Line 56: | Line 56: | ||
{{dcl list template | cpp/container/dcl list clear | set}} | {{dcl list template | cpp/container/dcl list clear | set}} | ||
{{dcl list template | cpp/container/dcl list insert | set}} | {{dcl list template | cpp/container/dcl list insert | set}} | ||
− | |||
− | |||
{{dcl list template | cpp/container/dcl list erase | set}} | {{dcl list template | cpp/container/dcl list erase | set}} | ||
{{dcl list template | cpp/container/dcl list swap | set}} | {{dcl list template | cpp/container/dcl list swap | set}} |
Revision as of 08:51, 13 January 2013
Defined in header <set>
|
||
template< class Key, |
||
std::set
is an associative container that contains a sorted set of unique objects of type Key. Sorting is done using the key comparison function Compare. Search, removal, and insertion operations have logarithmic complexity. Sets are usually implemented as red-black trees.
std::set
meets the requirements of Template:concept, Template:concept, Template:concept and Template:concept.
Contents |
Member types