std::ranges::iter_move
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Iterator library
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)(C++20)(C++23)(C++20)(C++20)
(deprecated in C++17)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++14)
(C++11)
(C++11)
(C++20)(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++23)
(C++23)
(C++23)
(C++23)
(C++23)
(C++11)(C++14)
(C++14)(C++14)
Defined in header
<iterator>
inline namespace /* unspecified */ {
(since C++20) inline constexpr /* unspecified */ iter_move = /* unspecified */;
(customization point object)
Call signature
template< class T >
(since C++20)
requires /* see below */
Obtains an rvalue reference or a prvalue temporary from a given iterator.
A ranges::iter_move(t) is expression-equivalent to:
- iter_move(t), if t has a class or enumeration type and the expression is well-formed when treated as an unevaluated operand, where the overload resolution of
iter_move
is performed only with the candidates found by argument-dependent lookup. - Otherwise, std::move(*t) if *t is well-formed and is an lvalue.
- Otherwise, *t if *t is well-formed and is an rvalue.
In all other cases, a call to ranges::iter_move
is ill-formed, which can result in substitution failure when ranges::iter_move(e) appears in the immediate context of a template instantiation.
If ranges::iter_move(e) is not equal to *e, the program is ill-formed, no diagnostic required.
Customization point objects
The name ranges::iter_move
denotes a customization point object, which is a const function object of a literal semiregular
class type. See CustomizationPointObject for details.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example
[edit] See also
(C++20)
(function) [edit]