[expected.object.dtor] (original) (raw)

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();

1

#

Effects: If has_value() is true, destroys val, otherwise destroys unex.

2

#

Remarks: If is_trivially_destructible_v<T> is true, andis_trivially_destructible_v<E> is true, then this destructor is a trivial destructor.