20 General utilities library [utilities]

20.6 Optional objects [optional]

20.6.3 Class template optional [optional.optional]

20.6.3.2 Destructor [optional.dtor]

~optional();
Effects: If is_­trivially_­destructible_­v<T> != true and *this contains a value, calls
val->T::~T()
Remarks: If is_­trivially_­destructible_­v<T> is true, then this destructor is trivial.