C++14 compliant implementation of std::is_swappable from <type_traits> of C++17. More...
C++14 compliant implementation of std::is_swappable from <type_traits> of C++17.
| T | a type to check whether it supports noexcept calls to swap (in the using std::swap; context). If T is not a C++ object (i.e. if std::is_object returns false for T), is_nothrow_swappable also returns false via its value field. Otherwise, the result is one of is_nothrow_swappable_with<T&, T&>. |
Checks whether objects of the type T are swappable without throwing any exceptions, i.e. if either a custom (non-std) swap for the type is provided, found via ADL and is declared as noexcept, or whether std::swap would be invoked for the call
where v and u are objects of the type T with its move-constructor and move-assignment operator defined as noexcept.
If compiled for C++17 or newer, the metafunction uses std::is_nothrow_swappable.
See std::is_nothrow_swappable for details.