std::expected<T,E>::~expected
|
constexpr ~expected();
|
(since C++23) | |
Destroys the currently contained value. That is, if has_value() is false, destroys the unexpected value; otherwise, if T is not (possibly cv-qualified) void, destroys the expected value.
This destructor is trivial if
- either
Tis (possibly cv-qualified) void, or std::is_trivially_destructible_v<T> is true, and - std::is_trivially_destructible_v<E> is true.
Example
| This section is incomplete Reason: no example |