1.8 KiB
[iterator.cust.move]
24 Iterators library [iterators]
24.3 Iterator requirements [iterator.requirements]
24.3.3 Customization point objects [iterator.cust]
24.3.3.1 ranges::iter_move [iterator.cust.move]
The name ranges::iter_move denotes a customization point object ([customization.point.object]).
The expression ranges::iter_move(E) for a subexpression E is expression-equivalent to:
-
iter_move(E), ifE has class or enumeration type anditer_move(E) is a well-formed expression when treated as an unevaluated operand, where the meaning of iter_move is established as-if by performing argument-dependent lookup only ([basic.lookup.argdep]).
-
Otherwise, if the expression *E is well-formed:
if *E is an lvalue, std::move(*E);
otherwise, *E.
-
Otherwise, ranges::iter_move(E) is ill-formed. [Note 1: This case can result in substitution failure when ranges::iter_move(E) appears in the immediate context of a template instantiation. â end note]
If ranges::iter_move(E) is not equal to *E, the program is ill-formed, no diagnostic required.