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 using the allocator_arg idiom.

Construct the first member with the allocator as the last argument.

Construct the first member of a pair with no allocator argument.

Construct the first member from the elements of argsPack.

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

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 idiom);

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 idiom);

Construct the first member from value, ignoring the allocator.

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

Parameters

Name

Description

value

value copied into the first member

basicAllocator

allocator used to supply memory

idiom

tag selecting the allocator_arg construction idiom

argsPack

tuple of arguments forwarded to the constructor of TYPE

indices

index sequence enumerating the elements of argsPack

Created with MrDocs