命名空间
变体
操作

operator-(std::move_iterator)

来自 cppreference.cn
 
 
迭代器库
迭代器概念
迭代器原语
算法概念与工具
间接可调用概念
常用算法要求
(C++20)
(C++20)
(C++20)
工具
(C++20)
迭代器适配器
范围访问
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
 
定义于头文件 <iterator>
template< class Iter1, class Iter2 >

auto operator-( const move_iterator<Iter1>& lhs,
                const move_iterator<Iter2>& rhs )

    -> decltype(lhs.base() - rhs.base());
(C++11 起)
(自 C++17 起为 constexpr)

返回两个迭代器适配器之间的距离。

目录

[编辑] 参数

lhs, rhs - 要计算差异的迭代器适配器

[编辑] 返回值

lhs.base() - rhs.base()

[编辑] 示例

[编辑] 参阅

递增或递减 move_iterator
(public member function) [编辑]
(C++11)
前进迭代器
(function template) [编辑]