bsl::optional::optional

Create a disengaged optional object.

Synopsis

Declared in <bslstl_optional.h>

constexpr
optional(bsl::nullopt_t nullopt) noexcept;

Description

Create a disengaged optional object. Use the currently installed default allocator to supply memory. This constructor can be called in constant expressions only when t_TYPE is not allocator-aware.

Parameters

NameDescription
nulloptdisengaged-optional tag; value is unused