名稱空間
變體
操作

operator-(ranges::zip_transform_view::sentinel)

來自 cppreference.com
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
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_