名稱空間
變體
操作

operator==(ranges::adjacent_view::iterator, ranges::adjacent_view::sentinel)

來自 cppreference.com
< cpp‎ | ranges‎ | adjacent view‎ | sentinel
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
template< bool OtherConst >

    requires std::sentinel_for<ranges::sentinel_t<Base>,
                               ranges::iterator_t</*maybe-const*/<OtherConst, V>>>
friend constexpr bool operator==( const /*iterator*/<OtherConst>& x,

                                  const /*sentinel*/& y );
(C++23 起)

比較 x 的底層迭代器與 y 的底層哨位。

等價於:return x.current_.back() == y.end_,其中 current_x 中的底層迭代器陣列,而 end_y 中的底層哨位。

此函式對通常的無限定限定查詢不可見,只能在 adjacent_view::sentinel<Const> 是引數的關聯類時由實參依賴查詢找到。

!= 運算子由 operator== 合成

[編輯] 引數

x - 要比較的迭代器
y - 要比較的哨位

[編輯] 返回值

若儲存在 x 中的底層迭代器是末尾迭代器,則為 true

[編輯] 示例