Scroll to navigation

std::expected::~expected(3) C++ Standard Libary std::expected::~expected(3)

NAME

std::expected::~expected - std::expected::~expected

Synopsis


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 T is (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

Category:


* Todo no example

2024.06.10 http://cppreference.com