std::variant::~variant - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::variant::~variant

From cppreference.com
< cpp‎ | utility‎ | variant

~variant(); |  | (since C++17)

If valueless_by_exception is true, does nothing. Otherwise, destroys the currently contained value.

This destructor is trivial if std::is_trivially_destructible_v<T_i> is `true` for all `T_i` in `Types...`

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/variant/%7Evariant&oldid=89760"