chsvlib
chsv helper source code
is_swappable_with< T, U > Struct Template Reference

C++14 compliant implementation of std::is_swappable_with from <type_traits> of C++17. More...

Detailed Description

template<class T, class U>
struct Chusov::is_swappable_with< T, U >

C++14 compliant implementation of std::is_swappable_with from <type_traits> of C++17.

Template Parameters
TA type to check whether it, together with U, can parameterize a binary call to swap (in the using std::swap; context).
UThe 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, i.e. if either a custom (non-std) swap for the types is provided and found via ADL for T and U or, if T and U are the same type, whether std::swap would be invoked for the call

using std::swap;
swap(v, u);
void swap(matrix_column< MatrixType > &left, matrix_column< MatrixType > &right)
Swaps contents of two matrix columns.
Definition: chsvmath.h:4095

where v and u are objects of the same type T.

If compiled for C++17 or newer, the metafunction uses std::is_swappable_with.

See std::is_swappable_with for details.

See also
is_swappable_with_v

The documentation for this struct was generated from the following file: