cpp/utility/optional/~optional

If the object contains a value and the type is not trivially destructible (see std), destroys the contained value by calling its destructor, as if by.

Otherwise, does nothing.