BloombergLP::bslstl::Optional_Base::Optional_Base

Constructors

Synopses

Declared in <bslstl_optional.h>

Create a disengaged Optional_Base object. Use the currently installed default allocator to supply memory.

Optional_Base();
» more...

Create an Optional_Base object having the value of the specified original object. Use the currently installed default allocator to supply memory.

Optional_Base(Optional_Base const& original);
» more...

Create a disengaged Optional_Base object. Use the currently installed default allocator to supply memory.

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

Create an Optional_Base object having the same value as the specified original object by moving the contents of original to the newly-created object. The allocator associated with original is propagated for use in the newly-created object. original is left in a valid, but unspecified state.

Optional_Base(BloombergLP::bslmf::MovableRef<Optional_Base> original) noexcept(/* see-below */);
» more...

Create a disengaged Optional_Base object. Use the specified allocator to supply memory.

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

Create an Optional_Base object whose contained value is initialized by forwarding from the specified value. Use the currently installed default allocator to supply memory.

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

Create a disengaged Optional_Base object if the specified original object is disengaged, and an Optional_Base object with the value of original.value() converted to t_TYPE otherwise. Use the currently installed default allocator to supply memory.

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

Create a disengaged Optional_Base object if the specified original object is disengaged, and an Optional_Base object with the value of original.value() converted to t_TYPE otherwise. Use the currently installed default allocator to supply memory.

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

Create a disengaged Optional_Base object if the specified original object is disengaged, and an Optional_Base object with the value of original.value() converted to t_TYPE otherwise. Use the currently installed default allocator to supply memory. original is left in a valid but unspecified state.

template<class t_ANY_TYPE>
Optional_Base(
    BloombergLP::bslstl::Optional_MoveConstructFromOtherOptional,
    BloombergLP::bslmf::MovableRef_Deduced<Optional_Base<t_ANY_TYPE>> original);
» more...

Create a disengaged Optional_Base object if the specified original object is disengaged, and an Optional_Base object with the value of original.value() otherwise. This is a special case constructor where t_ANY_TYPE is a non-const version of t_TYPE and we use the allocator from original to supply memory. original is left in a valid but unspecified state.

template<class t_ANY_TYPE>
Optional_Base(
    BloombergLP::bslstl::Optional_MoveConstructFromOtherOptional,
    BloombergLP::bslmf::MovableRef_Deduced<Optional_Base<t_ANY_TYPE>> original);
» more...

Create a disengaged Optional_Base object if the specified original object is disengaged, and an Optional_Base object with the value of original.value() converted to t_TYPE otherwise. Use the currently installed default allocator to supply memory.

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

Create an Optional_Base object having the value of the (template parameter) t_TYPE created in place using the specified args. Use the currently installed default allocator to supply memory.

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

Create a disengaged Optional_Base object. Use the specified allocator to supply memory.

Optional_Base(
    std::allocator_arg_t,
    allocator_type allocator,
    bsl::nullopt_t);
» more...

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

Optional_Base(
    std::allocator_arg_t,
    allocator_type allocator,
    BloombergLP::bslmf::MovableRef<Optional_Base> original);
» more...

If the specified original contains a value, create an Optional_Base object whose contained value is initialized from *original. Otherwise, create a disengaged Optional_Base object. Use the specified allocator to supply memory.

Optional_Base(
    std::allocator_arg_t,
    allocator_type allocator,
    Optional_Base const& original);
» 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 having the value of the (template parameter) t_TYPE created in place using the specified il and specified args. Use the currently installed default allocator to supply memory.

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

Create an Optional_Base object whose contained value is initialized by forwarding from the specified value. Use the specified allocator to supply memory.

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

If the specified original contains a value, create an Optional_Base object whose contained value is initialized from *original, converted to t_TYPE. Otherwise, create a disengaged Optional_Base. Use the specified allocator to supply memory.

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

If the specified original contains a value, create an Optional_Base object whose contained value is initialized from *original, converted to t_TYPE. Otherwise, create a disengaged Optional_Base object. Use the specified allocator to supply memory.

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

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.

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

If the specified original contains a value, create an Optional_Base object whose contained value is initialized from 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.

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

Create an Optional_Base object whose contained value is initialized from the specified args. Use the specified allocator to supply memory.

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

Create an Optional_Base object whose contained value is initialized from the specified il and args. Use the specified allocator to supply memory.

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