operator-(ranges::zip_transform_view::sentinel)
来自cppreference.com
范围库
| ||||||||||||||||||||||
| 范围原语 | |||||||
| |||||||
| 范围概念 | |||||||||||||||||||
| |||||||||||||||||||
| 范围工厂 | |||||||||
| |||||||||
| 范围适配器 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 辅助项 | |||||||||||||||||
|
| ||||||||||||||||
std::ranges::zip_transform_view
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 | - | 迭代器 |
| y | - | 哨位 |
返回值
令 inner_ 分别代表底层迭代器或哨位。
1)
x.inner_ - y.inner_2)
y.inner_ - x.inner_