std::ranges::iota_view<W, Bound>::sentinel
|
struct
/*sentinel*/;
|
(C++20 起) | |
iota_view::end 的返回类型,在
iota_view 有界(即 Bound 不是 std::unreachable_sentinel_t )且
Bound 与 W 不是同一类型时使用。
此类的名字(此处示作 /*sentinel*/)是未指定的。
典型实现保有一个 Bound 类型的数据成员(此处示作 bound_),对于有界
iota_view 常为数。
成员函数
std::ranges::iota_view::sentinel::sentinel
|
/*sentinel*/()
=
default;
|
(1) | (C++20 起) |
|
constexpr
explicit
/*sentinel*/(
Bound bound );
|
(2) | (C++20 起) |
非成员函数
在下列描述中, value_ 是 iterator
的仅用于阐释的数据成员,其 operator* 从该成员复制。
operator==(std::ranges::iota_view::iterator, std::ranges::iota_view::sentinel)
|
friend
constexpr
bool
operator==(
const
/*iterator*/&
x,
const /*sentinel*/& y); |
(C++20 起) | |
等价于 return x.value_ == y.bound_; 。
!= 运算符从 == 运算符合成。
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) |
(1) | (C++20 起) |
|
friend
constexpr
std::iter_difference_t<W>
operator-(const
/*sentinel*/&
x, const
/*iterator*/&
y) |
(2) | (C++20 起) |