A pair of public data members, first and second, that supports bslma allocators.
Synopsis
Declared in <bslstl_pair.h>
template<
class T1,
class T2>
class pair
: public Pair_First<T1>
, public Pair_Second<T2>
Description
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.
Base Classes
Name |
Description |
Component‐private base holding and constructing a pair's |
|
Component‐private base holding and constructing a pair's |
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 |
|
|
Convert to an |
|
Convert to an |
|
Convert to an |
Using Declarations
Protected Data Members
Deduction Guides
Name |
Description |
Deduce the specified types |
|
Deduce the specified types |
|
Deduce |
|
Deduce |
|
Deduce |
Non-Member Functions
Name |
Description |
Return a modifiable reference to the |
|
Return a non‐modifiable rvalue reference to the element of |
|
Return a non‐modifiable reference to the |
|
Return a non‐modifiable reference to the element of |
|
Return a modifiable reference to the element of |
|
Return a modifiable rvalue reference to the |
|
Return a modifiable rvalue reference to the element of |
|
Compare the specified |
|
Return |
|
Swap the values of the specified |
Created with MrDocs