9 Iterators library [iterators]

9.3 Iterator requirements [iterator.requirements]

9.3.2 Customization points [iterator.custpoints]

9.3.2.1 iter_move [iterator.custpoints.iter_move]

The name iter_move denotes a customization point object ([customization.point.object]). The expression ranges::iter_move(E) for some subexpression E is expression-equivalent to the following:

  • static_cast<decltype(iter_move(E))>(iter_move(E)), if that expression is well-formed when evaluated in a context that does not include ranges::iter_move but does include the lookup set produced by argument-dependent lookup ( ISO/IEC 14882:2014 §[basic.lookup.argdep]).

  • Otherwise, if the expression *E is well-formed:

    • if *E is an lvalue, std::move(*E);

    • otherwise, static_cast<decltype(*E)>(*E).

  • Otherwise, ranges::iter_move(E) is ill-formed.

If ranges::iter_move(E) does not equal *E, the program is ill-formed with no diagnostic required.