operator+(std::move_iterator)
来自 cppreference.cn
定义于头文件 <iterator> |
||
template< class Iter > move_iterator<Iter> operator+ |
(C++11 起) (自 C++17 起为 constexpr) (C++20 前) |
|
template< class Iter > constexpr move_iterator<Iter> operator+ |
(C++20 起) | |
返回迭代器 it 递增 n 位后的结果。
仅当 it.base() + n 形式良好且类型为 |
(C++20 起) |
目录 |
[编辑] 参数
n | - | 迭代器要递增的位置数 |
it | - | 要递增的迭代器适配器 |
[编辑] 返回值
it + n
[编辑] 示例
本节不完整 原因:无示例 |
[编辑] 缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
缺陷报告 | 应用于 | 发布时的行为 | 正确的行为 |
---|---|---|---|
LWG 3293 | C++20 | 非成员 operator+ 被限制为 要求 it + n 形式良好且类型为 Iter |
更改为 it.base() + n |
[编辑] 参阅
递增或递减 move_iterator (public member function) | |
(C++11) |
计算两个迭代器适配器之间的距离 (function template) |