A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../../cpp/utility/optional/nullopt_t.html below:

std::nullopt_t - cppreference.com

struct nullopt_t;

(since C++17)

std::nullopt_t is an empty class type used to indicate that an std::optional does not contain a value.

std::nullopt_t is a non-aggregate LiteralType that has no default constructor, no initializer-list constructor, but does have a constexpr constructor that takes an implementation-defined literal type.

[edit] 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 {
    constexpr explicit nullopt_t(int) {}
};
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4