std::move_iterator<Iter>::move_iterator
来自cppreference.com
< cpp | iterator | move iterator
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 初始化 |
3) 转换构造函数。
如果 | (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 (函数模板) |