|
BDE 4.39.x Production Release
|
#include <bslstl_pair.h>
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.
See bslstl_pair
Protected Member Functions | |
| Pair_Second (const Pair_Second &)=default | |
| Pair_Second (Pair_Second &&)=default | |
| Pair_Second & | operator= (const Pair_Second &)=default |
| Pair_Second & | operator= (Pair_Second &&)=default |
| ~Pair_Second ()=default | |
| Pair_Second () | |
| Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone) | |
| Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd) | |
| Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT) | |
| BSLS_KEYWORD_CONSTEXPR | Pair_Second (typename bsl::add_lvalue_reference< const TYPE >::type value) |
| template<class PARAM > | |
| Pair_Second (const PARAM &value) | |
| template<class PARAM > | |
| Pair_Second (PARAM &value) | |
| template<class PARAM > | |
| Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone) | |
| template<class PARAM > | |
| Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone) | |
| template<class PARAM > | |
| Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd) | |
| template<class PARAM > | |
| Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd) | |
| template<class PARAM > | |
| Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT) | |
| template<class PARAM > | |
| Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT) | |
Protected Attributes | |
| TYPE | second |
|
protecteddefault |
We must rely on implicitly declared special member functions to correctly support element types like bslma::ManagedPtr that have an unconventional copy constructor taking its argument by non-const reference. If we were to explicitly default these members then we would be forcing the copy constructor parameter to be const TYPE & whereas the implicitly declared constructor parameter will be TYPE &. We must then allow the move operations to be implicitly declared as if we explicitly default them then the copy operations would be deleted. As these operations are implicitly declared they will similarly be trivial, constexpr, noexcept, explicit, deleted, or (in the case of move operations) omitted according to the definition of (template parameter) TYPE.
const qualified copy operations correctly; we retain this convention while we continue to support C++17 and earlier dialects, but also embracing "rule of zero" as a widely regarded best practice.
|
protecteddefault |
|
protecteddefault |
|
inlineprotected |
Value-initialize the 'second' member of a 'pair'.
|
inlineprotected |
Construct the second member of a pair, using the specified basicAllocator to supply memory.
TYPE based on the following respective criteria: 1) TYPE does not support bslma-style allocators, 2) TYPE takes a bslma-style allocator as the last constructor argument, and 3) TYPE takes a bslma-style allocator as the second constructor argument preceded by bsl::allocator_arg.
|
inlineprotected |
|
inlineprotected |
|
inlineexplicitprotected |
Construct the second member from the specified non-modifiable value, without specifying an allocator.
|
inlineexplicitprotected |
Construct the 'second' member of a 'pair' from the specified 'value' without specifying an allocator. This function (perfectly) forwards 'value' to the constructor of (template parameter) 'TYPE'.
|
inlineexplicitprotected |
|
inlineprotected |
Construct the 'second' member of a 'pair' from the specified 'value', using the specified 'basicAllocator' to supply memory. This function (perfectly) forwards 'value' to the constructor of (template parameter) 'TYPE'.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protecteddefault |
|
protecteddefault |
|
protected |