Namespaces
Variants

operator- (std::move_iterator)

From cppreference.net
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(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
(公开成员函数)
(C++11)
前进迭代器
(函数模板)