concept
std::swappable_with
- Header
<concepts>- Draft
- [concepts.syn]
- Scope
std- cppreference
- std::swappable_with
Synopsis
template<class T, class U>
concept swappable_with = common_reference_with<T, U> && requires(T&& t, U&& u) {
ranges::swap(static_cast<T&&>(t), static_cast<T&&>(t));
ranges::swap(static_cast<U&&>(u), static_cast<U&&>(u));
ranges::swap(static_cast<T&&>(t), static_cast<U&&>(u));
ranges::swap(static_cast<U&&>(u), static_cast<T&&>(t));
};