BloombergLP::bslstl::Optional_Base::Optional_Base

Create an Optional_Base object.

Synopsis

Declared in <bslstl_optional.h>

template<class t_ANY_TYPE>
Optional_Base(
    std::allocator_arg_t allocatorArg,
    allocator_type allocator,
    BloombergLP::bslstl::Optional_MoveConstructFromOtherOptional tag,
    BloombergLP::bslmf::MovableRef_Deduced<Optional_Base<t_ANY_TYPE>> original);

Description

If the specified original contains a value, create an Optional_Base object whose contained value is initialized by moving from *original and converting to t_TYPE. Otherwise, create a disengaged Optional_Base. Use the specified allocator to supply memory. original is left in a valid but unspecified state.

Parameters

NameDescription
allocatorArgtag selecting the allocator-extended constructor
allocatorallocator used to supply memory
tagtag selecting this constructor overload
originalsource optional used to initialize this object