| Defined in header
<variant> | ||
|---|---|---|
template <class... Types> void swap(variant<Types...>& lhs, variant<Types...>& rhs) | (since C++17) |
Overloads the std::swap algorithm for std::variant. Effectively calls lhs.swap(rhs).
| lhs, rhs | - | variant objects whose values to swap |
(none).
noexcept specification: noexcept(lhs.swap(rhs))| swaps with another variant (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/utility/variant/swap2