std::experimental::ranges:: Sentinel
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Iterator concepts | |||||||||||||||||||||||
|
|||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||
| Concept utilities | |||||||||||||||||||||||
| Iterator utilities and operations | |||||||||||||||||||||||
| Iterator traits | |||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||
| Stream iterators | |||||||||||||||||||||||
|
template
<
class
S,
class
I
>
concept
bool
Sentinel
=
|
(ranges TS) | |
Sentinel
概念规定了
Iterator
类型与
Semiregular
类型之间的关系,后者的值用于表示一个范围。
设
s
和
i
分别为类型
S
和
I
的值,使得
[
i
,
s
)
表示一个范围。仅当满足以下条件时,
Sentinel<S, I>
才成立:
- i == s 是明确定义的。
-
若
bool
(
i
!
=
s
)
成立,则
i是可解引用的,且[++ i,s)表示一个范围。
==
的定义域可能随时间变化。给定迭代器
i
与哨位
s
,若
[
i
,
s
)
表示一个区间且
i
!
=
s
,则在递增任何等于
i
的迭代器后,
[
i
,
s
)
不再被要求继续表示有效区间(因此在此类递增操作后,
i
==
s
不再被要求具有良定义性)。