std::ranges::iter_swap

Header: <iterator>

Swaps values denoted by two iterators.

# Declarations

namespace ranges {
inline namespace /* unspecified */ {
inline constexpr /* unspecified */
iter_swap = /* unspecified */;
}
}

(since C++20) (customization point object)

Call signature
template< class I1, class I2 >
constexpr void iter_swap( I1&& i1, I2&& i2 ) noexcept(/* see below */);

(since C++20)

Helper function
template< class X, class Y >
constexpr std::iter_value_t<X>
iter-exchange-move( X&& x, Y&& y )
noexcept(noexcept(std::iter_value_t<X>(std::ranges::iter_move(x))) &&
noexcept(*x = std::ranges::iter_move(y)));

(exposition only*)

# Example

This section is incompleteReason: no example

# See also