22 General utilities library [utilities]

22.8 Expected objects [expected]

22.8.6 Class template expected [expected.expected]

22.8.6.3 Destructor [expected.object.dtor]

constexpr ~expected();
Effects: If has_­value() is true, destroys val, otherwise destroys unex.
Remarks: If is_­trivially_­destructible_­v<T> is true, and is_­trivially_­destructible_­v<E> is true, then this destructor is a trivial destructor.