iter_move(ranges::transform_view::iterator)
来自cppreference.com
| ||||||||||||||||||||||
| 范围原语 | |||||||
| |||||||
| 范围概念 | |||||||||||||||||||
| |||||||||||||||||||
| 范围工厂 | |||||||||
| |||||||||
| 范围适配器 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 辅助项 | |||||||||||||||||
|
| ||||||||||||||||
friend constexpr decltype(auto) iter_move( const /*iterator*/& i )
noexcept(/* 见下文 */);
|
(C++20 起) | |
若 *i 为左值引用则返回 std::move(*i),否则返回 *i。
此函数对常规的无限定或有限定查找不可见,而只能在 transform_view::iterator<Const> 为实参的关联类时由实参依赖查找找到。
| i | - | 迭代器 |
若 *i 为左值引用则为 std::move(*i),否则为 *i。
noexcept(noexcept(std::invoke(*i.parent_->fun_, *i.current_))),其中 *i.parent_->fun_ 代表变换函数,i.current_ 代表底层迭代器。