std::ranges::iter_move
Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Defined in header <iterator>
|
||
inline
namespace
/* unspecified */
{
inline constexpr /* unspecified */ iter_move = /* unspecified */; |
(since C++20) (customization point object) |
|
Call signature |
||
template
<
class T >
requires /* see below */ |
(since C++20) | |
Obtains an rvalue reference or a prvalue temporary from a given iterator.
A ranges::iter_move(t) is expression-equivalent
-
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
- Otherwise, *t if *t
In all other cases, a call to ranges::iter_move
is ill-formed, which can result in substitution failure when
ranges::iter_move(e)
If ranges::iter_move(e) is not equal to *e
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. For exposition purposes, the cv-unqualified version of its type is denoted as __iter_move_fn
All instances of __iter_move_fn
are equal. The effects of invoking different instances of type
__iter_move_fn
on the same arguments are equivalent, regardless of whether the expression denoting the instance is an lvalue or rvalue, and is const-qualified or not (however, a volatile-qualified instance is not required to be invocable). Thus, ranges::iter_move
Given a set of types Args...
, if
std::declval
<Args>
(
)
meet the requirements for arguments to ranges::iter_move
above, __iter_move_fn
models
- std::invocable<__iter_move_fn, Args...>
- std::invocable < const __iter_move_fn, Args...>
- std::invocable <__iter_move_fn&, Args...>
-
std::invocable
<
const __iter_move_fn&, Args...>
.
Otherwise, no function call operator of __iter_move_fn
participates in overload resolution.
Example
This section is incomplete Reason: no example |
See also
(C++20)
|
casts the result of dereferencing the adjusted underlying iterator to its associated rvalue reference type (function) |
(C++20)
|
casts the result of dereferencing the underlying iterator to its associated rvalue reference type (function) |