std::nullopt_t (3) - Linux Manuals
std::nullopt_t: std::nullopt_t
Command to display std::nullopt_t
manual in Linux: $ man 3 std::nullopt_t
NAME
std::nullopt_t - std::nullopt_t
Synopsis
Defined in header <optional>
struct nullopt_t; (since C++17)
std::nullopt_t is an empty class type used to indicate optional type with uninitialized state. In particular, std::optional has a constructor with nullopt_t as a single argument, which creates an optional that does not contain a value.
std::nullopt_t must be a non-aggregate LiteralType and cannot have a default constructor or an initializer-list constructor.
It must have a constexpr constructor that takes some implementation-defined literal type.
Notes
The constraints on nullopt_t's constructors exist to support both op = {}; and op = nullopt; as the syntax for disengaging an optional object.
A possible implementation of this class is
struct nullopt_t {
explicit constexpr nullopt_t(int) {}
};
See also
nullopt an object of type nullopt_t
(constant)
(C++17)
Pages related to std::nullopt_t
- std::nullopt (3) - std::nullopt
- std::nullptr_t (3) - std::nullptr_t
- std::num_get (3) - std::num_get
- std::num_get<CharT,InputIt>::get,std::num_get<CharT,InputIt>::do_get (3) - std::num_get<CharT,InputIt>::get,std::num_get<CharT,InputIt>::do_get
- std::num_get<CharT,InputIt>::num_get (3) - std::num_get<CharT,InputIt>::num_get
- std::num_get<CharT,InputIt>::~num_get (3) - std::num_get<CharT,InputIt>::~num_get
- std::num_put (3) - std::num_put
- std::num_put<CharT,OutputIt>::num_put (3) - std::num_put<CharT,OutputIt>::num_put
- std::num_put<CharT,OutputIt>::put,std::num_put<CharT,OutputIt>::do_put (3) - std::num_put<CharT,OutputIt>::put,std::num_put<CharT,OutputIt>::do_put
- std::num_put<CharT,OutputIt>::~num_put (3) - std::num_put<CharT,OutputIt>::~num_put
- std::numeric_limits (3) - std::numeric_limits