• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <ranges>

    std::ranges::filter_view::sentinel::operator==

    friend constexpr bool operator==(const iterator& x, const sentinel& y);
    

    概要

    自身と別のイテレータが同じかを判定する。

    効果

    ラップしている番兵をend_メンバ変数に保持するとして、以下と等価

    return x.current_ == y.end_;
    

    戻り値

    元のビューのイテレータと番兵が等しい場合にtrueを返す。

    備考

    • この演算子により逆順の == 演算子と、それぞれに対応する != 演算子が使用可能になる。

    (執筆中)

    バージョン

    言語

    • C++20

    処理系

    参照