From Jason Turner

[range.zip.transform.sentinel]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1go60x42/{from.md → to.md} +69 -0
tmp/tmp1go60x42/{from.md → to.md} RENAMED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class template `zip_transform_view::sentinel` <a id="range.zip.transform.sentinel">[[range.zip.transform.sentinel]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::ranges {
5
+ template<move_constructible F, input_range... Views>
6
+ requires (view<Views> && ...) && (sizeof...(Views) > 0) && is_object_v<F> &&
7
+ regular_invocable<F&, range_reference_t<Views>...> &&
8
+ can-reference<invoke_result_t<F&, range_reference_t<Views>...>>
9
+ template<bool Const>
10
+ class zip_transform_view<F, Views...>::sentinel {
11
+ zentinel<Const> inner_; // exposition only
12
+ constexpr explicit sentinel(zentinel<Const> inner); // exposition only
13
+
14
+ public:
15
+ sentinel() = default;
16
+ constexpr sentinel(sentinel<!Const> i)
17
+ requires Const && convertible_to<zentinel<false>, zentinel<Const>>;
18
+
19
+ template<bool OtherConst>
20
+ requires sentinel_for<zentinel<Const>, ziperator<OtherConst>>
21
+ friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
22
+
23
+ template<bool OtherConst>
24
+ requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
25
+ friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>>
26
+ operator-(const iterator<OtherConst>& x, const sentinel& y);
27
+
28
+ template<bool OtherConst>
29
+ requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
30
+ friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>>
31
+ operator-(const sentinel& x, const iterator<OtherConst>& y);
32
+ };
33
+ }
34
+ ```
35
+
36
+ ``` cpp
37
+ constexpr explicit sentinel(zentinel<Const> inner);
38
+ ```
39
+
40
+ *Effects:* Initializes *inner\_* with `inner`.
41
+
42
+ ``` cpp
43
+ constexpr sentinel(sentinel<!Const> i)
44
+ requires Const && convertible_to<zentinel<false>, zentinel<Const>>;
45
+ ```
46
+
47
+ *Effects:* Initializes *inner\_* with `std::move(i.`*`inner_`*`)`.
48
+
49
+ ``` cpp
50
+ template<bool OtherConst>
51
+ requires sentinel_for<zentinel<Const>, ziperator<OtherConst>>
52
+ friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
53
+ ```
54
+
55
+ *Effects:* Equivalent to: `return x.`*`inner_`*` == y.`*`inner_`*`;`
56
+
57
+ ``` cpp
58
+ template<bool OtherConst>
59
+ requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
60
+ friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>>
61
+ operator-(const iterator<OtherConst>& x, const sentinel& y);
62
+ template<bool OtherConst>
63
+ requires sized_sentinel_for<zentinel<Const>, ziperator<OtherConst>>
64
+ friend constexpr range_difference_t<maybe-const<OtherConst, InnerView>>
65
+ operator-(const sentinel& x, const iterator<OtherConst>& y);
66
+ ```
67
+
68
+ *Effects:* Equivalent to: `return x.`*`inner_`*` - y.`*`inner_`*`;`
69
+