iter_move(s...t_iterator)(3)
π NAME π
okay so bestie, welcome to the iter_move(s...t_iterator)(3) page from the C++ Standard Libary manual β yes, that's the manual name exactly, typo and all, and we are respecting it. π
The NAME line is literally: iter_move(std::basic_const_iterator) - iter_move(std::basic_const_iterator). It's giving self-referential icon behavior, and honestly? Obsessed.
β¨ Synopsis β¨
The signature is a friend constexpr moment, with a noexcept situation and a βsince C++23β note tucked in the comment. Here it is exactly:
friend constexpr /*rvalue-reference*/
iter_move( const basic_const_iterator& i ) noexcept(/* see below
(since C++23)
*/);
What it does: it casts the result of dereferencing the underlying iterator to its associated const rvalue reference type. Lowkey elegant.
The return type /*rvalue-reference*/ is:
std::common_reference_t<const std::iter_value_t<Iter>&&, std::iter_rvalue_reference_t<Iter>>
The function body is equivalent to: return static_cast</*rvalue-reference*/>(std::ranges::iter_move(i.base()));.
Big important vibe check: this function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::basic_const_iterator<Iter> is an associated class of the arguments. So no ordinary lookup hunting, bestie β ADL has to be the one to find it. π
πΈ Return value πΈ
An rvalue reference to const, or a prvalue. That's the whole return-value tea. β
π Exceptions π
The noexcept specification is exactly:
noexcept(noexcept(static_cast</*rvalue-reference*/>(std::ranges::iter_move(i.base()))))
π¦ Example π¦
This section is incomplete. Reason: no example.
No example, bestie π. The manual is literally serving βincompleteβ with βno exampleβ as the reason, and we are not inventing one. Periodt.
π See also π
iter_move casts the result of dereferencing an object to its associated rvalue reference type β with the manual's (C++20) marker and the (customization point object) label. So yes, customization-point-object energy.
π Categories π
- conditionally noexcept
- Todo no example
signed off with love from http://cppreference.com, version/date 2024.06.10. Mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms