Namespaces
Variants

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

From cppreference.net
Ranges library
Range adaptors
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 > and

std:: three_way_comparable < ranges:: iterator_t < Base >> ;
(6) (自 C++23 起)

比较底层迭代器: inner_

1) 等价于 return x. inner_ == y. inner_ ;
2) 等价于 return x. inner_ < y. inner_ ;
3) 等价于 return x. inner_ > y. inner_ ;
4) 等价于 return x. inner_ <= y. inner_ ;
5) 等价于 return x. inner_ >= y. inner_ ;
6) 等价于 return x. inner_ <=> y. inner_ ;

这些函数对普通的 非限定查找 限定查找 不可见,仅当 std::ranges::adjacent_transform_view:: iterator <Const> 作为参数的关联类时,才能通过 实参依赖查找 找到。

!= 运算符由 operator== 合成 而来。

目录

参数

x, y - 待比较的迭代器

返回值

比较结果。

示例

参见

(C++23)
比较哨位与从 adjacent_transform_view::begin 返回的迭代器
(函数)