C++14 compliant implementation of std::is_nothrow_swappable_with from <type_traits> of C++17. More...
C++14 compliant implementation of std::is_nothrow_swappable_with from <type_traits> of C++17.
T | A type to check whether it, together with U , can parameterize a binary call to swap (in the using std::swap; context). |
U | The type of a second parameter to swap. Ability to parameterize the call to swap with the types T and U is checked in both forward and reverse order. |
Checks whether objects addressed by references of types T&
and U&
are swappable without throwing any exceptions, i.e. if either a custom (non-std) swap
for the types is provided, found via ADL for T
and U
and is declared as noexcept
, or, if T
and U
are the same type, whether std::swap would be invoked for the call
where v and u are objects of the same 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_with.
See std::is_nothrow_swappable_with for details.