Namespaces
Variants

operator- (ranges::transform_view:: sentinel )

From cppreference.net
Ranges library
Range adaptors
friend constexpr ranges:: range_difference_t < Base >

operator - ( const /*iterator*/ < Const > & x, const /*sentinel*/ & y )
requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,

ranges:: iterator_t < Base >> ;
(1) (C++20 起)
friend constexpr ranges:: range_difference_t < Base >

operator - ( const /*sentinel*/ & y, const /*iterator*/ < Const > & x )
requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,

ranges:: iterator_t < Base >> ;
(2) (C++20 起)

计算 x 底层迭代器与 y 底层哨位之间的距离。

这些函数对普通的 非限定查找 限定查找 不可见,仅当 transform_view:: sentinel <Const> 作为参数关联类时,才能通过 实参依赖查找 找到。

参数

x - 一个 迭代器
y - 一个哨兵

返回值

current_ 表示底层迭代器, end_ 表示底层哨位。

1) x. current_ - y. end_
2) y. end_ - x. current_