function object
std::ranges::iter_swap
- Header
<iterator>- Draft
- [iterator.cust.swap]
- Scope
std::ranges- cppreference
- std::ranges::iter_swap
Synopsis
inline constexpr /* implementation-defined */ iter_swap = {};Call signatures
iter_swap is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template<class T, class U> requires adl-iter-swap<T, U> || (std::indirectly_readable<T> && std::indirectly_readable<U> && std::swappable_with<std::iter_reference_t<T>, std::iter_reference_t<U>>) || (std::indirectly_movable_storable<T, U> && std::indirectly_movable_storable<U, T>) constexpr void iter_swap( T&& t, U&& u) noexcept(iter-swap-noexcept<T, U>());