std::move_iterator<Iter>:: move_iterator
| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
move_iterator::move_iterator
|
||||
| Non-member functions | ||||
|
(until C++20)
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++20)
|
||||
|
(C++11)
|
|
move_iterator
(
)
;
|
(1) | (自 C++17 起为 constexpr) |
|
explicit
move_iterator
(
iterator_type x
)
;
|
(2) | (自 C++17 起为 constexpr) |
|
template
<
class
U
>
move_iterator ( const move_iterator < U > & other ) ; |
(3) | (自 C++17 起为 constexpr) |
构造一个新的
move_iterator
。
| 重载版本 |
current
|
|---|---|
| (1) | 值初始化 |
| (2) | 使用 x (C++20 前) std :: move ( x ) (C++20 起) 初始化 |
| (3) |
使用
other.
current
初始化
|
|
如果
|
(C++20 前) |
|
此重载仅当 std:: is_same_v < U, Iter > 为 false 且满足 std:: convertible_to < const U & , Iter > 概念时参与重载决议。 |
(C++20 起) |
目录 |
参数
| x | - | 待适配的迭代器 |
| other | - | 要复制的迭代器适配器 |
示例
|
本节内容不完整
原因:缺少示例 |
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 应用于 | 发布时的行为 | 正确行为 |
|---|---|---|---|
| LWG 3435 | C++20 | 重载 ( 3 ) 未受约束 | 已受约束 |
参见
赋值另一个
move_iterator
(公开成员函数) |
|
|
(C++11)
|
创建从参数推断类型的
std::move_iterator
(函数模板) |