Namespaces
Variants
Views
Actions

std::optional::reset

From cppreference.com
< cpp‎ | utility‎ | optional
 
 
 
 
void reset() noexcept;
(since C++17)

If *this contains a value, destroy that value as if by value().T::~T(). Otherwise, there are no effects.

*this does not contain a value after this call.

[edit] See also

assigns contents
(public member function) [edit]