From Jason Turner

[range.join.sentinel]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpale7ybgw/{from.md → to.md} +11 -9
tmp/tmpale7ybgw/{from.md → to.md} RENAMED
@@ -1,28 +1,28 @@
1
  #### Class template `join_view::sentinel` <a id="range.join.sentinel">[[range.join.sentinel]]</a>
2
 
3
  ``` cpp
4
  namespace std::ranges {
5
  template<input_range V>
6
- requires view<V> && input_range<range_reference_t<V>> &&
7
- (is_reference_v<range_reference_t<V>> ||
8
- view<range_value_t<V>>)
9
  template<bool Const>
10
  struct join_view<V>::sentinel {
11
  private:
12
- using Parent = // exposition only
13
- conditional_t<Const, const join_view, join_view>;
14
- using Base = conditional_t<Const, const V, V>; // exposition only
15
  sentinel_t<Base> end_ = sentinel_t<Base>(); // exposition only
 
16
  public:
17
  sentinel() = default;
18
 
19
  constexpr explicit sentinel(Parent& parent);
20
  constexpr sentinel(sentinel<!Const> s)
21
  requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
22
 
23
- friend constexpr bool operator==(const iterator<Const>& x, const sentinel& y);
 
 
24
  };
25
  }
26
  ```
27
 
28
  ``` cpp
@@ -37,10 +37,12 @@ constexpr sentinel(sentinel<!Const> s)
37
  ```
38
 
39
  *Effects:* Initializes *end\_* with `std::move(s.`*`end_`*`)`.
40
 
41
  ``` cpp
42
- friend constexpr bool operator==(const iterator<Const>& x, const sentinel& y);
 
 
43
  ```
44
 
45
- *Effects:* Equivalent to: `return x.`*`outer_`*` == y.`*`end_`*`;`
46
 
 
1
  #### Class template `join_view::sentinel` <a id="range.join.sentinel">[[range.join.sentinel]]</a>
2
 
3
  ``` cpp
4
  namespace std::ranges {
5
  template<input_range V>
6
+ requires view<V> && input_range<range_reference_t<V>>
 
 
7
  template<bool Const>
8
  struct join_view<V>::sentinel {
9
  private:
10
+ using Parent = maybe-const<Const, join_view>; // exposition only
11
+ using Base = maybe-const<Const, V>; // exposition only
 
12
  sentinel_t<Base> end_ = sentinel_t<Base>(); // exposition only
13
+
14
  public:
15
  sentinel() = default;
16
 
17
  constexpr explicit sentinel(Parent& parent);
18
  constexpr sentinel(sentinel<!Const> s)
19
  requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
20
 
21
+ template<bool OtherConst>
22
+ requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
23
+ friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
24
  };
25
  }
26
  ```
27
 
28
  ``` cpp
 
37
  ```
38
 
39
  *Effects:* Initializes *end\_* with `std::move(s.`*`end_`*`)`.
40
 
41
  ``` cpp
42
+ template<bool OtherConst>
43
+ requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
44
+ friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
45
  ```
46
 
47
+ *Effects:* Equivalent to: `return x.`*`outer`*`() == y.`*`end_`*`;`
48