bsl::Pair_Second::Pair_Second

Constructors

Synopses

Declared in <bslstl_pair.h>

Value-initialize the 'second' member of a 'pair'. This constructor is declared only if (template parameter) TYPE is default constructible.

constexpr
Pair_Second()
requires std::is_default_constructible_v<TYPE>;
» more...

Construct the second member from the specified non-modifiable value, without specifying an allocator.

constexpr
explicit
Pair_Second(bsl::add_lvalue_reference<TYPE const>::type value);
» more...

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. Note that this constructor is constrained to avoid accidentally becoming a stronger match for the move and copy constructors.

template<
    class PARAM,
    class = void>
requires !bsl::is_same<Pair_Second,
                                      bsl::remove_cvref_t<PARAM>>::value
constexpr
explicit
Pair_Second(PARAM&& value);
» more...

Construct the second member of a pair, using the specified basicAllocator to supply memory. This constructor is selected when (template parameter) TYPE takes a bslma-style allocator as the second constructor argument preceded by bsl::allocator_arg.

Pair_Second(
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAllocatorArgT);
» more...

Construct the second member of a pair, using the specified basicAllocator to supply memory. This constructor is selected when (template parameter) TYPE takes a bslma-style allocator as the last constructor argument.

Pair_Second(
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAtEnd);
» more...

Construct the second member of a pair, using the specified basicAllocator to supply memory. Note that exactly one of these three constructors is enabled at compile-time for (template parameter) type 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.

Pair_Second(
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomNone);
» more...

Construct the second member of a pair, forwarding in order the elements in the specified argsPack to the corresponding constructor of (template parameter) TYPE. The length of the argsPack is equal to the length of the specified (template parameter pack) I... and passed to the constructor via the Pair_IndexSequence object.

template<
    class... ARGS,
    size_t I...>
Pair_Second(
    std::tuple<ARGS...>&& argsPack,
    BloombergLP::bslstl::Pair_IndexSequence<I...>);
» more...

Construct the second member using the specified basicAllocator.

template<class PARAM>
Pair_Second(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAllocatorArgT);
» more...

Construct the second member of a pair from the specified value, using the specified basicAllocator to supply memory. This constructor is selected when (template parameter) TYPE takes a bslma-style allocator as the last constructor argument.

template<class PARAM>
Pair_Second(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAtEnd);
» more...

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. Note that exactly one of these three constructors is enabled at compile-time for (template parameter) type 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.

template<class PARAM>
Pair_Second(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomNone);
» more...