This component‐private class holds the second data member of a pair and constructs it appropriately. Note the partial specializations below for the cases that (template parameter) 'TYPE' is a reference.

Synopsis

Declared in <bslstl_pair.h>

template<class TYPE>
struct Pair_Second;

Protected Member Functions

Name

Description

Pair_Second [constructor]

Constructors

Protected Data Members

Name

Description

second

Second element of the pair.

Specializations

Name

Description

Pair_Second<TYPE&>

This component‐private class holds the second 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_Second<TYPE&&>

This component‐private class holds the second 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.

Derived Classes

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.

Created with MrDocs