The class template pair provides a pair of public data members, first and second, of type T1 and T2 respectively. If either T1 or T2 uses bslma::Allocator for memory management, then provide an optional bslma::Allocator argument for each constructor, to be passed through to the constructors of first and/or second as appropriate. The interface to this class is identical to the standard std::pair except for the addition of the allocators. Note that the implementation of this class provides first and second through multiple base classes in order to simplify construction of each member when allowing for the various rules for passing allocators in C++11.
Synopsis
Declared in <bslstl_pair.h>
template<
class T1,
class T2>
class pair
: public Pair_First<T1>
, public Pair_Second<T2>
Base Classes
Name |
Description |
This component‐private |
|
This component‐private |
Type Aliases
Name |
Description |
This |
|
This |
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Swap the value of this pair with the value of the specified |
|
Return an |
|
|
This overload of `template <class PARAM_1, class PARAM_2> operator std::tuple<PARAM_1&, PARAM_2&>()` is called when the (template parameter) |
|
This overload of `template <class PARAM_1, class PARAM_2> operator std::tuple<PARAM_1&, PARAM_2&>()` is called when the (template parameter) |
|
This overload of `template <class PARAM_1, class PARAM_2> operator std::tuple<PARAM_1&, PARAM_2&>()` is called when the (template parameters) |
Protected Data Members
Deduction Guides
Name |
Description |
Deduce the specified types |
|
Deduce the specified types |
|
Deduce the specified types |
|
Deduce the specified types |
|
Deduce the specified types |
Non-Member Functions
Name |
Description |
Return a reference providing modifiable access to the element of the specified |
|
Return a rvalue reference providing non‐modifiable access to the element of the specified |
|
Return a reference providing non‐modifiable access to the element of the specified |
|
Return a reference providing non‐modifiable access to the element of the specified |
|
Return a reference providing modifiable access to the element of the specified |
|
Return a rvalue reference providing modifiable access to the element of the specified |
|
Return a rvalue reference providing modifiable access to the element of the specified |
|
Perform a lexicographic three‐way comparison of the specified |
|
Return true if the specified |
|
Swap the values of the specified |
Created with MrDocs