operator==,<><=,>=,<=>(ranges::transform_view::iterator)
cppreference.net에서 가져옴
friend constexpr bool operator==( const /*iterator*/& x, const /*iterator*/& y )
requires std::equality_comparable<ranges::iterator_t<Base>>;
|
(1) | (C++20부터) |
friend constexpr bool operator<( const /*iterator*/& x, const /*iterator*/& y )
requires ranges::random_access_range<Base>;
|
(2) | (C++20부터) |
friend constexpr bool operator>( const /*iterator*/& x, const /*iterator*/& y )
requires ranges::random_access_range<Base>;
|
(3) | (C++20부터) |
friend constexpr bool operator<=( const /*iterator*/& x, const /*iterator*/& y )
requires ranges::random_access_range<Base>;
|
(4) | (C++20부터) |
friend constexpr bool operator>=( const /*iterator*/& x, const /*iterator*/& y )
requires ranges::random_access_range<Base>;
|
(5) | (C++20부터) |
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++20부터) |
내부 반복자를 비교합니다.
1)
return x.current_ == y.current_;와 동일합니다. 여기서 current_은 내부 반복자입니다.
2)
return x.current_ < y.current_;와 동일합니다. 여기서 current_은 내부 반복자입니다.
3)
return y < x;와 동일합니다.
4)
return !(y < x);와 동일합니다.
5)
return !(x < y);와 동일합니다.
6)
return x.current_ <=> y.current_;와 동일합니다. 여기서 current_은 내부 반복자입니다.
이 함수들은 일반적인 비한정 또는 한정 조회에 표시되지 않으며, 인자 종속 조회를 통해서만 찾을 수 있습니다. 단, std::ranges::transform_view::iterator<Const>가 인자의 연관된 클래스인 경우에만 해당합니다.
!= 연산자는 합성된 operator==입니다.
매개변수
| x, y | - | 비교할 반복자 |
반환값
비교 결과
참고 항목
|
(C++20)
|
sentinel을
transform_view::begin
에서 반환된 iterator와 비교합니다
(function) |