Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      operator==,<=>(ranges::enumerate_view::iterator)

      From cppreference.com
      <cpp‎ |ranges‎ |enumerate view‎ |iterator
       
       
      Ranges library
      Range adaptors
       
      std::ranges::enumerate_view
      Member functions
      Deduction guides
      Nested classes
      Iterator
      operator==(enumerate_view::iterator)
      operator<=>(enumerate_view::iterator)
      Sentinel
       
      friendconstexprbool
          operator==(const/*iterator*/& x,const/*iterator*/& y)noexcept;
      (1)(since C++23)
      friendconstexprstd::strong_ordering
          operator<=>(const/*iterator*/& x,const/*iterator*/& y)noexcept;
      (2)(since C++23)

      Compares the underlyingiterators. Letpos_ be the underlying index.

      1) Equivalent toreturn x.pos_== y.pos_;.
      2) Equivalent toreturn x.pos_<=> y.pos_;.

      These functions are not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup whenstd::ranges::enumerate_view::iterator<Const> is an associated class of the arguments.

      The<,<=,>,>=, and!= operators aresynthesized fromoperator<=> andoperator== respectively.

      [edit]Parameters

      x, y - iterators to compare

      [edit]Return value

      Result of comparison.

      [edit]See also

      (C++23)
      compares a sentinel with an iterator returned fromenumerate_view::begin
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/enumerate_view/iterator/operator_cmp&oldid=172622"

      [8]ページ先頭

      ©2009-2025 Movatter.jp