A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../../iterator/ranges/iter_move.html below:

std::ranges::iter_move - cppreference.com

inline namespace /* unspecified */ {

    inline constexpr /* unspecified */ iter_move = /* unspecified */;

}
(since C++20)
(customization point object)

Call signature

template< class T >

    requires /* see below */

constexpr decltype(auto) iter_move( T&& t ) noexcept(/* 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 to:

  1. 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.
  2. Otherwise, std::move(*t) if *t is well-formed and is an lvalue.
  3. 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 [edit] See also casts the result of dereferencing the adjusted underlying iterator to its associated rvalue reference type
(function) [edit] casts the result of dereferencing the underlying iterator to its associated rvalue reference type
(function) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4