std::experimental::nullopt_t
From cppreference.com
< cpp | experimental | optional
Defined in header <experimental/optional>
|
||
struct nullopt_t; |
(library fundamentals TS) | |
std::experimental::nullopt_t is an empty class type used to indicate optional type with uninitialized state. In particular,
std::experimental::optional
has a constructor with nullopt_t
std::experimental::nullopt_t must be a LiteralType
It must have a constexpr constructor that takes some implementation-defined literal type.
Notes
nullopt_t is not DefaultConstructible to support both op = {}; and op = nullopt;
A possible implementation of this class is
struct nullopt_t { constexpr nullopt_t(int) {} };
See also
|
(C++17)
|
an object of type nullopt_t (constant) |