Constructors

Synopses

Declared in <bslstl_pair.h>

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

constexpr
Pair_First()
requires std::is_default_constructible_v<TYPE>;

Construct the first member from the specified non‐modifiable value, without specifying an allocator.

constexpr
explicit
Pair_First(bsl::add_lvalue_reference<TYPE const>::type value);

Construct the first member from the specified value.

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

Construct the first 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.

Construct the first 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.

Construct the first 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.

Construct the first 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_First(
    std::tuple<ARGS...>&& argsPack,
    BloombergLP::bslstl::Pair_IndexSequence<I...>);

Construct the first member using the specified value and basicAllocator, with Pair_BslmaIdiomAllocatorArgT placement.

template<class PARAM>
Pair_First(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAllocatorArgT);

Construct the first member using the specified value and basicAllocator, with Pair_BslmaIdiomAtEnd placement.

template<class PARAM>
Pair_First(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomAtEnd);

Construct the 'first' 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' when 'TYPE' does not use 'bslma'‐style allocators.

template<class PARAM>
Pair_First(
    PARAM&& value,
    BloombergLP::bslma::Allocator* basicAllocator,
    Pair_BslmaIdiomNone);

Created with MrDocs