Namespaces
Variants

iter_move(ranges::transform_view::iterator)

来自 zh.cppreference.net
 
 
范围库
范围适配器
 
 
friend constexpr decltype(auto) iter_move( const /*iterator*/& i )
    noexcept(/* see below */);
(C++20 起)

如果 *i 是左值引用,则返回 std::move(*i);否则返回 *i。

此函数 对普通 非限定或 有限查找不可见,仅能通过 实参依赖查找在 transform_view::iterator<Const> 是实参的关联类时找到。

参数

i - iterator

返回值

当 * i 是左值引用时使用 std :: move ( * i ) ,否则直接使用 * i

异常

noexcept 规范:
noexcept ( noexcept ( std:: invoke ( * i. parent_ - > fun_, * i. current_ ) ) )
where * i. parent_ - > fun_ denotes the transformation function, i. current_ denotes the underlying iterator.