Namespaces
Variants

std::ranges::iota_view<W, Bound>::sentinel

由 zh.cppreference.net 提供
 
 
范围库
范围适配器
 
 
struct /*sentinel*/;
(仅用于阐述*)

ranges::iota_view<W, Bound>::sentinel 是由 end() 的 ranges::iota_view<W, Bound> 返回的可达哨位的类型。

数据成员

成员 定义
Bound bound_ 哨兵值
( 仅用于说明的成员对象* )

成员函数

std::ranges::iota_view:: sentinel :: sentinel

/*sentinel*/ ( ) = default ;
(1) (since C++20)
constexpr explicit /*sentinel*/ ( Bound bound ) ;
(2) (since C++20)
1) 对 bound_ 进行值初始化。
2) 使用 bound 初始化 bound_ 。

非成员函数

operator== (std::ranges::iota_view:: iterator , std::ranges::iota_view:: sentinel )

friend constexpr bool operator == ( const /*iterator*/ & x,
const /*sentinel*/ & y ) ;
(C++20 起)

返回 x. value_ == y. bound_ 。

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

此函数对常规的 无限定 或 有限定查找 不可见,只有在 sentinel 是实参的关联类时,才能通过 实参依赖查找 找到。

operator- (std::ranges::iota_view:: iterator , std::ranges::iota_view:: sentinel )

friend constexpr std:: iter_difference_t < W >

operator - ( const /*iterator*/ & x, const /*sentinel*/ & y )

requires std:: sized_sentinel_for < Bound, W > ;
(1) (since C++20)
friend constexpr std:: iter_difference_t < W >

operator - ( const /*sentinel*/ & x, const /*iterator*/ & y )

requires std:: sized_sentinel_for < Bound, W > ;
(2) (since C++20)
1) 返回 x. value_ - y. bound_ 。
2) 返回 - ( y. value_ - x. bound_  ) 。

这些函数对普通的 非限定查找 或 限定查找 不可见,仅当 sentinel 是参数的关联类时才能通过 实参依赖查找 找到。

示例