C++ 参考手册

位置:首页 > C++ 参考手册 >迭代器库 >std::move_iterator > std::move_iterator<Iter>::move_iterator

(1)
move_iterator();
(C++17 前)
constexpr move_iterator();
(C++17 起)
(2)
explicit move_iterator( iterator_type x );
(C++17 前)
constexpr explicit move_iterator( iterator_type x );
(C++17 起)
(3)
template< class U >
move_iterator( const move_iterator<U>& other );
(C++17 前)
template< class U >
constexpr move_iterator( const move_iterator<U>& other );
(C++17 起)

构造新的迭代器适配器。

1) 默认构造函数。值初始化底层迭代器。若且唯若值初始化的底层迭代器有受定义行为,产生的迭代器上的操作才一样有受定义行为。
2)x (C++20 前)std::move(x) (C++20 起) 初始化底层迭代器。
3)other.base() 初始化底层迭代器。若 other.base() 不可转换到 Iter行为未定义 (C++20 前)程序为谬构 (C++20 起)

参数

x - 要适配的迭代器
other - 要复制的迭代器适配器

示例

本节未完成
原因:暂无示例

参阅

赋值另一迭代器
(公开成员函数)