operator+(std::move_iterator)

在标头 <iterator> 定义
template< class Iter >

move_iterator<Iter>
    operator+( typename move_iterator<Iter>::difference_type n,

               const move_iterator<Iter>& it );
(C++11 起)
(C++17 前)
template< class Iter >

constexpr move_iterator<Iter>
    operator+( typename move_iterator<Iter>::difference_type n,

               const move_iterator<Iter>& it );
(C++17 起)
返回增加了 n 的迭代器 it

此重载只有在it.base() + n 良构并拥有 Iter 类型时才会参与重载决议。

(C++20 起)

参数

n - 迭代器所要增加的位置数
it - 要增加的迭代器适配器

返回值

增加的迭代器,即 move_iterator<Iter>(it.base() + n)

示例

参阅

推进或回退迭代器
(公开成员函数)
(C++11)
计算两个迭代器适配器间的距离
(函数模板)