std::experimental::ranges::is_swappable_with, std::experimental::ranges::is_swappable, std::experimental::ranges::is_nothrow_swappable_with, std::experimental::ranges::is_nothrow_swappable
Min standard notice:
Header: <experimental/ranges/type_traits>
- If the expressions ranges::swap(std::declval
(), std::declval()) and ranges::swap(std::declval(), std::declval ()) are both well-formed when treated as an unevaluated operand, provides the member constant value equal true. Otherwise, value is false. Access checks are performed as if from a context unrelated to either type.
# Declarations
template< class T, class U >
struct is_swappable_with;
(ranges TS)
template< class T >
struct is_swappable;
(ranges TS)
template< class T, class U >
struct is_nothrow_swappable_with;
(ranges TS)
template< class T >
struct is_nothrow_swappable;
(ranges TS)
# Notes
This trait does not check anything outside the immediate context of the swap expressions: if the use of T or U would trigger template specializations, generation of implicitly-defined special member functions etc, and those have errors, the actual swap may not compile even if ranges::is_swappable_with<T,U>::value compiles and evaluates to true.
# Example
This section is incompleteReason: no example