Files
2025-10-25 03:02:53 +03:00

1.8 KiB
Raw Permalink Blame History

[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]

1

#

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:

  • (1.1)

    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]).

  • (1.2)

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

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

otherwise, *E.

  • (1.3)

    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]

2

#

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