Namespaces
Variants

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

cppreference.net에서 가져옴
 
 
Ranges 라이브러리
Range 어댑터
 
 
friend constexpr bool operator==( const /*iterator*/& x, std::default_sentinel_t );
(1) (C++23부터)
friend constexpr bool operator==( const /*iterator*/& x, const /*iterator*/& y )
    requires std::equality_comparable<ranges::iterator_t<Base>>;
(2) (C++23부터)
friend constexpr bool operator<( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base>;
(3) (C++23부터)
friend constexpr bool operator>( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base>;
(4) (C++23부터)
friend constexpr bool operator<=( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base>;
(5) (C++23부터)
friend constexpr bool operator>=( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base>;
(6) (C++23부터)
friend constexpr auto operator<=>( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base> and
             std::three_way_comparable<ranges::iterator_t<Base>>;
(7) (C++23부터)

내부 반복자/센티넬을 비교합니다.

current_를 내부 반복자라고 하고, end_를 내부 센티넬이라고 합니다.

1) return x.current_ == x.end_;와 동일합니다.
2) return x.current_ == y.current_;와 동일합니다.
3) return x.current_ < y.current_;와 동일합니다.
4) return y < x;
와 동일합니다.5)return !(y < x);
와 동일합니다.return !(x < y);
6) return x.current_ <=> y.current_;와 동일합니다.

이 함수들은 일반적인 비한정 또는 한정 조회로는 볼 수 없으며, 인자 종속 조회를 통해서만 찾을 수 있습니다. std::ranges::stride_view::iterator<Const>가 인자의 연관 클래스일 때 가능합니다.

!= 연산자는 synthesized from operator==입니다.

매개변수

x, y - 비교할 반복자

반환값

비교 결과

예제