From Jason Turner

[range.filter.sentinel]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp6daj5d29/{from.md → to.md} +38 -0
tmp/tmp6daj5d29/{from.md → to.md} RENAMED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class `filter_view::sentinel` <a id="range.filter.sentinel">[[range.filter.sentinel]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::ranges {
5
+ template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
6
+ requires view<V> && is_object_v<Pred>
7
+ class filter_view<V, Pred>::sentinel {
8
+ private:
9
+ sentinel_t<V> end_ = sentinel_t<V>(); // exposition only
10
+ public:
11
+ sentinel() = default;
12
+ constexpr explicit sentinel(filter_view& parent);
13
+
14
+ constexpr sentinel_t<V> base() const;
15
+
16
+ friend constexpr bool operator==(const iterator& x, const sentinel& y);
17
+ };
18
+ }
19
+ ```
20
+
21
+ ``` cpp
22
+ constexpr explicit sentinel(filter_view& parent);
23
+ ```
24
+
25
+ *Effects:* Initializes *end\_* with `ranges::end(parent.`*`base_`*`)`.
26
+
27
+ ``` cpp
28
+ constexpr sentinel_t<V> base() const;
29
+ ```
30
+
31
+ *Effects:* Equivalent to: `return `*`end_`*`;`
32
+
33
+ ``` cpp
34
+ friend constexpr bool operator==(const iterator& x, const sentinel& y);
35
+ ```
36
+
37
+ *Effects:* Equivalent to: `return x.`*`current_`*` == y.`*`end_`*`;`
38
+