From Jason Turner

[range.iota.sentinel]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvmdrnozo/{from.md → to.md} +49 -0
tmp/tmpvmdrnozo/{from.md → to.md} RENAMED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class `iota_view::sentinel` <a id="range.iota.sentinel">[[range.iota.sentinel]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::ranges {
5
+ template<weakly_incrementable W, semiregular Bound>
6
+ requires weakly-equality-comparable-with<W, Bound>
7
+ struct iota_view<W, Bound>::sentinel {
8
+ private:
9
+ Bound bound_ = Bound(); // exposition only
10
+ public:
11
+ sentinel() = default;
12
+ constexpr explicit sentinel(Bound bound);
13
+
14
+ friend constexpr bool operator==(const iterator& x, const sentinel& y);
15
+
16
+ friend constexpr iter_difference_t<W> operator-(const iterator& x, const sentinel& y)
17
+ requires sized_sentinel_for<Bound, W>;
18
+ friend constexpr iter_difference_t<W> operator-(const sentinel& x, const iterator& y)
19
+ requires sized_sentinel_for<Bound, W>;
20
+ };
21
+ }
22
+ ```
23
+
24
+ ``` cpp
25
+ constexpr explicit sentinel(Bound bound);
26
+ ```
27
+
28
+ *Effects:* Initializes *bound\_* with `bound`.
29
+
30
+ ``` cpp
31
+ friend constexpr bool operator==(const iterator& x, const sentinel& y);
32
+ ```
33
+
34
+ *Effects:* Equivalent to: `return x.`*`value_`*` == y.`*`bound_`*`;`
35
+
36
+ ``` cpp
37
+ friend constexpr iter_difference_t<W> operator-(const iterator& x, const sentinel& y)
38
+ requires sized_sentinel_for<Bound, W>;
39
+ ```
40
+
41
+ *Effects:* Equivalent to: `return x.`*`value_`*` - y.`*`bound_`*`;`
42
+
43
+ ``` cpp
44
+ friend constexpr iter_difference_t<W> operator-(const sentinel& x, const iterator& y)
45
+ requires sized_sentinel_for<Bound, W>;
46
+ ```
47
+
48
+ *Effects:* Equivalent to: `return -(y - x);`
49
+