tmp/tmp2n0x4t78/{from.md → to.md}
RENAMED
|
@@ -6,22 +6,28 @@
|
|
| 6 |
an initial value.
|
| 7 |
|
| 8 |
The name `views::iota` denotes a customization point object
|
| 9 |
[[customization.point.object]]. Given subexpressions `E` and `F`, the
|
| 10 |
expressions `views::iota(E)` and `views::iota(E, F)` are
|
| 11 |
-
expression-equivalent to `iota_view(E)
|
| 12 |
-
respectively.
|
| 13 |
|
| 14 |
[*Example 1*:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
for (int i : views::iota(1, 10))
|
| 18 |
cout << i << ' '; // prints 1 2 3 4 5 6 7 8 9
|
| 19 |
```
|
| 20 |
|
| 21 |
— *end example*]
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
#### Class template `iota_view` <a id="range.iota.view">[[range.iota.view]]</a>
|
| 24 |
|
| 25 |
``` cpp
|
| 26 |
namespace std::ranges {
|
| 27 |
template<class I>
|
|
@@ -51,10 +57,11 @@ namespace std::ranges {
|
|
| 51 |
|
| 52 |
constexpr iterator begin() const;
|
| 53 |
constexpr auto end() const;
|
| 54 |
constexpr iterator end() const requires same_as<W, Bound>;
|
| 55 |
|
|
|
|
| 56 |
constexpr auto size() const requires see below;
|
| 57 |
};
|
| 58 |
|
| 59 |
template<class W, class Bound>
|
| 60 |
requires (!is-integer-like<W> || !is-integer-like<Bound> ||
|
|
@@ -198,10 +205,16 @@ else
|
|
| 198 |
constexpr iterator end() const requires same_as<W, Bound>;
|
| 199 |
```
|
| 200 |
|
| 201 |
*Effects:* Equivalent to: `return `*`iterator`*`{`*`bound_`*`};`
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
``` cpp
|
| 204 |
constexpr auto size() const requires see below;
|
| 205 |
```
|
| 206 |
|
| 207 |
*Effects:* Equivalent to:
|
|
|
|
| 6 |
an initial value.
|
| 7 |
|
| 8 |
The name `views::iota` denotes a customization point object
|
| 9 |
[[customization.point.object]]. Given subexpressions `E` and `F`, the
|
| 10 |
expressions `views::iota(E)` and `views::iota(E, F)` are
|
| 11 |
+
expression-equivalent to `iota_view<decay_t<decltype((E))>>(E)` and
|
| 12 |
+
`iota_view(E, F)`, respectively.
|
| 13 |
|
| 14 |
[*Example 1*:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
for (int i : views::iota(1, 10))
|
| 18 |
cout << i << ' '; // prints 1 2 3 4 5 6 7 8 9
|
| 19 |
```
|
| 20 |
|
| 21 |
— *end example*]
|
| 22 |
|
| 23 |
+
The name `views::indices` denotes a customization point object
|
| 24 |
+
[[customization.point.object]]. Given subexpression `E`, let `T` be
|
| 25 |
+
`remove_cvref_t<decltype((E))>`. `views::indices(E)` is
|
| 26 |
+
expression-equivalent to `views::iota(T(0), E)` if `is-integer-like<T>`
|
| 27 |
+
is `true`, and ill-formed otherwise.
|
| 28 |
+
|
| 29 |
#### Class template `iota_view` <a id="range.iota.view">[[range.iota.view]]</a>
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
namespace std::ranges {
|
| 33 |
template<class I>
|
|
|
|
| 57 |
|
| 58 |
constexpr iterator begin() const;
|
| 59 |
constexpr auto end() const;
|
| 60 |
constexpr iterator end() const requires same_as<W, Bound>;
|
| 61 |
|
| 62 |
+
constexpr bool empty() const;
|
| 63 |
constexpr auto size() const requires see below;
|
| 64 |
};
|
| 65 |
|
| 66 |
template<class W, class Bound>
|
| 67 |
requires (!is-integer-like<W> || !is-integer-like<Bound> ||
|
|
|
|
| 205 |
constexpr iterator end() const requires same_as<W, Bound>;
|
| 206 |
```
|
| 207 |
|
| 208 |
*Effects:* Equivalent to: `return `*`iterator`*`{`*`bound_`*`};`
|
| 209 |
|
| 210 |
+
``` cpp
|
| 211 |
+
constexpr bool empty() const;
|
| 212 |
+
```
|
| 213 |
+
|
| 214 |
+
*Effects:* Equivalent to: `return `*`value_`*` == `*`bound_`*`;`
|
| 215 |
+
|
| 216 |
``` cpp
|
| 217 |
constexpr auto size() const requires see below;
|
| 218 |
```
|
| 219 |
|
| 220 |
*Effects:* Equivalent to:
|