Difference between revisions of "cpp/utility/pair"
From cppreference.com
(rm piec) |
(→Non-member functions: moved) |
||
Line 35: | Line 35: | ||
{{dcl list template | cpp/utility/pair/dcl list make_pair}} | {{dcl list template | cpp/utility/pair/dcl list make_pair}} | ||
{{dcl list template | cpp/utility/pair/dcl list operator_comp}} | {{dcl list template | cpp/utility/pair/dcl list operator_comp}} | ||
− | {{dcl list template | cpp/utility/pair/dcl list | + | {{dcl list template | cpp/utility/pair/dcl list swap2}} |
{{dcl list template | cpp/utility/pair/dcl list get}} | {{dcl list template | cpp/utility/pair/dcl list get}} | ||
{{dcl list end}} | {{dcl list end}} |
Revision as of 11:05, 3 November 2011
Template:cpp/utility/pair/sidebar
Defined in header <utility>
|
||
template< class T1, |
||
std::pair
is a struct template that provides a way to store two heterogeneous objects as a single unit.
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list end
Member objects
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list end
Member functions
constructs new pair (public member function) | |
assigns the contents (public member function) | |
(C++11) |
swaps the contents (public member function) |
Non-member functions
creates a pair object of type, determined by the argument types (function template) | |
(C++11) |
specializes the std::swap algorithm (function template) |
(C++11) |
accesses an element of a pair (function template) |
Helper classes
(C++11) |
obtains the size of a pair (class template specialization) |
obtains the type of the elements of pair (class template specialization) |