tmp/tmpji61rwg_/{from.md → to.md}
RENAMED
|
@@ -1,36 +1,41 @@
|
|
| 1 |
#### Class template `transform_view::sentinel` <a id="range.transform.sentinel">[[range.transform.sentinel]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std::ranges {
|
| 5 |
-
template<input_range V,
|
| 6 |
requires view<V> && is_object_v<F> &&
|
| 7 |
regular_invocable<F&, range_reference_t<V>> &&
|
| 8 |
can-reference<invoke_result_t<F&, range_reference_t<V>>>
|
| 9 |
template<bool Const>
|
| 10 |
class transform_view<V, F>::sentinel {
|
| 11 |
private:
|
| 12 |
-
using Parent =
|
| 13 |
-
|
| 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 |
constexpr explicit sentinel(sentinel_t<Base> end);
|
| 19 |
constexpr sentinel(sentinel<!Const> i)
|
| 20 |
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
|
| 21 |
|
| 22 |
constexpr sentinel_t<Base> base() const;
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
| 32 |
};
|
| 33 |
}
|
| 34 |
```
|
| 35 |
|
| 36 |
``` cpp
|
|
@@ -51,26 +56,30 @@ constexpr sentinel_t<Base> base() const;
|
|
| 51 |
```
|
| 52 |
|
| 53 |
*Effects:* Equivalent to: `return `*`end_`*`;`
|
| 54 |
|
| 55 |
``` cpp
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
```
|
| 58 |
|
| 59 |
*Effects:* Equivalent to: `return x.`*`current_`*` == y.`*`end_`*`;`
|
| 60 |
|
| 61 |
``` cpp
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 65 |
```
|
| 66 |
|
| 67 |
*Effects:* Equivalent to: `return x.`*`current_`*` - y.`*`end_`*`;`
|
| 68 |
|
| 69 |
``` cpp
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
```
|
| 74 |
|
| 75 |
*Effects:* Equivalent to: `return y.`*`end_`*` - x.`*`current_`*`;`
|
| 76 |
|
|
|
|
| 1 |
#### Class template `transform_view::sentinel` <a id="range.transform.sentinel">[[range.transform.sentinel]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std::ranges {
|
| 5 |
+
template<input_range V, move_constructible F>
|
| 6 |
requires view<V> && is_object_v<F> &&
|
| 7 |
regular_invocable<F&, range_reference_t<V>> &&
|
| 8 |
can-reference<invoke_result_t<F&, range_reference_t<V>>>
|
| 9 |
template<bool Const>
|
| 10 |
class transform_view<V, F>::sentinel {
|
| 11 |
private:
|
| 12 |
+
using Parent = maybe-const<Const, transform_view>; // exposition only
|
| 13 |
+
using Base = maybe-const<Const, V>; // exposition only
|
|
|
|
| 14 |
sentinel_t<Base> end_ = sentinel_t<Base>(); // exposition only
|
| 15 |
+
|
| 16 |
public:
|
| 17 |
sentinel() = default;
|
| 18 |
constexpr explicit sentinel(sentinel_t<Base> end);
|
| 19 |
constexpr sentinel(sentinel<!Const> i)
|
| 20 |
requires Const && convertible_to<sentinel_t<V>, sentinel_t<Base>>;
|
| 21 |
|
| 22 |
constexpr sentinel_t<Base> base() const;
|
| 23 |
|
| 24 |
+
template<bool OtherConst>
|
| 25 |
+
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 26 |
+
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
|
| 27 |
|
| 28 |
+
template<bool OtherConst>
|
| 29 |
+
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 30 |
+
friend constexpr range_difference_t<maybe-const<OtherConst, V>>
|
| 31 |
+
operator-(const iterator<OtherConst>& x, const sentinel& y);
|
| 32 |
+
|
| 33 |
+
template<bool OtherConst>
|
| 34 |
+
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 35 |
+
friend constexpr range_difference_t<maybe-const<OtherConst, V>>
|
| 36 |
+
operator-(const sentinel& y, const iterator<OtherConst>& x);
|
| 37 |
};
|
| 38 |
}
|
| 39 |
```
|
| 40 |
|
| 41 |
``` cpp
|
|
|
|
| 56 |
```
|
| 57 |
|
| 58 |
*Effects:* Equivalent to: `return `*`end_`*`;`
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
+
template<bool OtherConst>
|
| 62 |
+
requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 63 |
+
friend constexpr bool operator==(const iterator<OtherConst>& x, const sentinel& y);
|
| 64 |
```
|
| 65 |
|
| 66 |
*Effects:* Equivalent to: `return x.`*`current_`*` == y.`*`end_`*`;`
|
| 67 |
|
| 68 |
``` cpp
|
| 69 |
+
template<bool OtherConst>
|
| 70 |
+
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 71 |
+
friend constexpr range_difference_t<maybe-const<OtherConst, V>>
|
| 72 |
+
operator-(const iterator<OtherConst>& x, const sentinel& y);
|
| 73 |
```
|
| 74 |
|
| 75 |
*Effects:* Equivalent to: `return x.`*`current_`*` - y.`*`end_`*`;`
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
+
template<bool OtherConst>
|
| 79 |
+
requires sized_sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
|
| 80 |
+
friend constexpr range_difference_t<maybe-const<OtherConst, V>>
|
| 81 |
+
operator-(const sentinel& y, const iterator<OtherConst>& x);
|
| 82 |
```
|
| 83 |
|
| 84 |
*Effects:* Equivalent to: `return y.`*`end_`*` - x.`*`current_`*`;`
|
| 85 |
|