• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <ranges>

    std::ranges::filter_view::iterator::operator==

    friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable<iterator_t<V>>;
    

    概要

    自身と別のイテレータが同じ要素を指しているかを判定する。

    効果

    ラップしているイテレータをcurrent_メンバ変数に保持するとして、以下と等価

    return x.current_ == y.current_;
    

    戻り値

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

    備考

    • この演算子により != 演算子が使用可能になる。

    (執筆中)

    バージョン

    言語

    • C++20

    処理系

    参照