BloombergLP::bslstl::Optional_Base<t_TYPE, false>::Optional_Base

Constructors

Synopses

Declared in <bslstl_optional.h>

Create a disengaged Optional_Base object.

constexpr
Optional_Base();
» more...

Create a disengaged Optional_Base object.

constexpr
Optional_Base(bsl::nullopt_t nullopt);
» more...

These allocator-extended constructors cannot be called, and are provided only to prevent compilation errors when 'optional' is explicitly instantiated.

Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator);
» more...

Create an Optional_Base object whose contained value is initialized by forwarding from the specified value.

template<class t_ANY_TYPE>
constexpr
Optional_Base(
    BloombergLP::bslstl::Optional_ConstructFromForwardRef tag,
    t_ANY_TYPE&& value);
» more...

Create an Optional_Base object.

template<class t_ANY_TYPE>
constexpr
Optional_Base(
    BloombergLP::bslstl::Optional_CopyConstructFromOtherOptional tag,
    Optional_Base<t_ANY_TYPE> const& original);
» more...

Create an Optional_Base by copying from a std::optional.

template<class t_ANY_TYPE>
constexpr
Optional_Base(
    BloombergLP::bslstl::Optional_CopyConstructFromStdOptional tag,
    std::optional<t_ANY_TYPE> const& original);
» more...

Create an Optional_Base object.

template<class t_ANY_TYPE>
constexpr
Optional_Base(
    BloombergLP::bslstl::Optional_MoveConstructFromOtherOptional tag,
    Optional_Base<t_ANY_TYPE>&& original);
» more...

Create an Optional_Base by moving from a std::optional.

template<class t_ANY_TYPE>
constexpr
Optional_Base(
    BloombergLP::bslstl::Optional_MoveConstructFromStdOptional tag,
    std::optional<t_ANY_TYPE>&& original);
» more...

Create an Optional_Base object whose contained value is initialized from the specified args.

template<class... t_ARGS>
constexpr
explicit
Optional_Base(
    std::in_place_t inPlace,
    t_ARGS&&... args);
» more...

Create a disengaged Optional_Base using allocator.

Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    bsl::nullopt_t nullopt);
» more...

Create an Optional_Base object, which contains the result of invocation of the specified invocable with the specified arg.

template<
    class t_INVOCABLE,
    class t_ARG>
Optional_Base(
    Optional_InvokeConstructorTag tag,
    t_INVOCABLE&& invocable,
    t_ARG&& arg);
» more...

Create an Optional_Base object whose contained value is initialized from the specified il and args.

template<
    class t_INIT_LIST_TYPE,
    class... t_ARGS>
constexpr
Optional_Base(
    std::in_place_t inPlace,
    std::initializer_list<t_INIT_LIST_TYPE> il,
    t_ARGS&&... args);
» more...

Create an Optional_Base whose value is forwarded from value.

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    BloombergLP::bslstl::Optional_ConstructFromForwardRef tag,
    t_ANY_TYPE&& value);
» more...

Create an Optional_Base by copying from another optional.

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    BloombergLP::bslstl::Optional_CopyConstructFromOtherOptional tag,
    Optional_Base<t_ANY_TYPE> const& original);
» more...

Create an Optional_Base by copying from a std::optional.

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    BloombergLP::bslstl::Optional_CopyConstructFromStdOptional tag,
    std::optional<t_ANY_TYPE> const& original);
» more...

Create an Optional_Base by moving from another optional.

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    BloombergLP::bslstl::Optional_MoveConstructFromOtherOptional tag,
    Optional_Base<t_ANY_TYPE>&& original);
» more...

Create an Optional_Base by moving from a std::optional.

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    BloombergLP::bslstl::Optional_MoveConstructFromStdOptional tag,
    std::optional<t_ANY_TYPE>&& original);
» more...

Create an Optional_Base with an in-place constructed value.

template<class... t_ARGS>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    std::in_place_t inPlace,
    t_ARGS&&... args);
» more...

Create an Optional_Base with an in-place constructed value.

template<
    class t_INIT_LIST_TYPE,
    class... t_ARGS>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    AllocType allocator,
    std::in_place_t inPlace,
    std::initializer_list<t_INIT_LIST_TYPE> il,
    t_ARGS&&... args);
» more...

Parameters

NameDescription
nulloptdisengaged-optional tag; value is unused
allocatorArgtag selecting the allocator-extended constructor
allocatorallocator used to supply memory
tagtag selecting this constructor overload
valuevalue compared with or used to initialize the optional
originalsource optional used to initialize this object
inPlacetag selecting in-place construction of the contained value
argsarguments forwarded to construct the contained value
invocablecallable invoked to produce the contained value
argargument forwarded to construct the contained value
ilinitializer list forwarded to construct the contained value