operator-(ranges::zip_transform_view::哨位)
来自 zh.cppreference.net
template< bool OtherConst >
requires std::sized_sentinel_for</*zentinel*/<Const>, /*ziperator*/<OtherConst>>
friend constexpr ranges::range_difference_t</*maybe-const*/<OtherConst, /*InnerView*/>>
operator-( const /*iterator*/<OtherConst>& x, const /*sentinel*/& y );
|
(1) | (C++23 起) |
template< bool OtherConst >
requires std::sized_sentinel_for</*zentinel*/<Const>, /*ziperator*/<OtherConst>>
friend constexpr ranges::range_difference_t</*maybe-const*/<OtherConst, /*InnerView*/>>
operator-( const /*sentinel*/& y, const /*iterator*/<OtherConst>& x );
|
(2) | (C++23 起) |
计算 x 的底层迭代器与 y 的底层哨位之间的距离。
这些函数 模板对于普通的非限定或限定查找不可见,只能在对参数进行参数依赖查找时,当 zip_transform_view::sentinel 是参数的关联类时才能找到。
参数
| x | - | 一个 iterator |
| y | - | 一个 sentinel |
返回值
令
inner_
分别表示底层迭代器或哨位。
1)
x.
inner_
-
y.
inner_
2)
y.
inner_
-
x.
inner_