chsvlib
chsv helper source code
is_swappable< T > Struct Template Reference

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

Detailed Description

template<class T>
struct Chusov::is_swappable< T >

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

Template Parameters
Ta type to check whether it supports calls to swap (in the using std::swap; context). If T is not a C++ object (i.e. if std::is_object returns false), is_swappable also returns false via its value field. Otherwise, the result is one of is_swappable_with<T&, T&>.

Checks whether objects of the type T are swappable, i.e. if either a custom (non-std) swap for the types is provided and found via ADL or 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 type T.

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

See std::is_swappable for details.

See also
is_swappable_v

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