Defined in header <expected> | ||
---|---|---|
struct unexpect_t { explicit unexpect_t() = default; }; | (1) | (since C++23) |
inline constexpr unexpect_t unexpect{}; | (2) | (since C++23) |
std::expected
object.const std::unexpect_t
which is usually directly passed to a constructor of std::expected
to construct an unexpected value.Like other construction tag types, unexpect_t
is a trivial, empty class with an explicit default constructor.
(C++23) | constructs the expected object (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/utility/expected/unexpect_t