Namespaces
Variants

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

cppreference.net에서
 
 
Ranges 라이브러리
Range 어댑터
 
 
friend constexpr bool operator==( const /*iterator*/& x, const /*iterator*/& y );
(1) (C++23부터)
friend constexpr bool operator<( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<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 auto operator<=>( const /*iterator*/& x, const /*iterator*/& y )
    requires ranges::random_access_range<Base> &&
             std::three_way_comparable<ranges::iterator_t<Base>>;
(6) (C++23부터)

내부 반복자를 비교합니다.

current_과 last_ele_를 각각 슬라이딩 윈도우의 시작과 끝에 대한 내부 반복자라고 합시다.

1) 다음과 동일:
  • return x.last_ele_ == y.last_ele_;, 만약 last_ele_이 존재한다면. 그렇지 않으면,
  • return x.current_ == y.current_;.
2) return x.current_ < y.current_;와 동일.
3) return y < x;와 동일.
4) return !(y < x);와 동일.
5) return !(x < y);와 동일.
6) return x.current_ <=> y.current_;와 동일.

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

!= 연산자는 합성됩니다. operator==에서.

매개변수

x, y - 비교할 반복자

반환값

비교 결과.

예제

참고 항목

(C++23)
slide_view::begin 에서 반환된 반복자와 sentinel을 비교합니다
(function)