This component-private class holds the first data member of a pair and constructs it appropriately. Note the partial specializations below for the cases that (template parameter) 'TYPE' is a reference.
Declared in <bslstl_pair.h>
template<class TYPE>
struct Pair_First;
| Name | Description |
|---|---|
Pair_First [constructor] | Constructors |
| Name | Description |
|---|---|
first | First element of the pair. |
| Name | Description |
|---|---|
Pair_First<TYPE&> | This component-private class holds the first data member of a pair when that member is an lvalue-reference. Note that the C++ Standard defines the assignment operator to assign through the reference in this case, where the implicitly declared assignment operator would be deleted. |
Pair_First<TYPE&&> | This component-private class holds the first data member of a pair when that member is an rvalue-reference. Note that the C++ Standard defines the assignment operator to assign through the reference in this case, where the implicitly declared assignment operator would be deleted. |
| Name | Description |
|---|---|
pair | 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. |