You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| **Underlying range** | Must satisfy `forward_range` or higher |
33
+
| **Underlying range** | Must satisfy [`forward_range`](range-concepts.md#forward_range) or higher |
34
34
| **Element type** | Same as the underlying range |
35
-
| **View iterator category** | Supports `forward_range` or `random_access_range` when the underlying range satisfies `random_access_range` and `sized_range` |
36
-
| **Sized** | Only if the underlying range satisfies `sized_range` |
35
+
| **View iterator category** | Supports `forward_range` or [`random_access_range`](range-concepts.md#random_access_range) when the underlying range satisfies `random_access_range` and [`sized_range`](range-concepts.md#sized_range) |
36
+
| **Sized** | Only if the underlying range satisfies [`sized_range`](range-concepts.md#sized_range) |
37
37
| **Is `const`-iterable** | Only if the underlying range is `const` iterable |
38
38
| **Common range** | Yes |
39
-
| **Borrowed range** | Only if the underlying range satisfies `borrowed_range` |
39
+
| **Borrowed range** | Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range) |
| **Underlying range** | Must satisfy `output_range` or higher |
32
+
| **Underlying range** | Must satisfy [`output_range`](range-concepts.md#output_range) or higher |
33
33
| **Element type** | Same as the underlying range |
34
34
| **View iterator category** | Same as the underlying range |
35
-
| **Sized** | Only if the underlying range satisfies `sized_range` |
36
-
| **Is `const`-iterable** | Only if the underlying range is `const` iterable and satisfies `random_access_range` and `sized_range` |
37
-
| **Common range** | Only if the underlying range is a `common_range` |
38
-
| **Borrowed range** | Only if the underlying range satisfies `borrowed_range` |
35
+
| **Sized** | Only if the underlying range satisfies [`sized_range`](range-concepts.md#sized_range) |
36
+
| **Is `const`-iterable** | Only if the underlying range is `const` iterable and satisfies [`random_access_range`](range-concepts.md#random_access_range) and [`sized_range`](range-concepts.md#sized_range) |
37
+
| **Common range** | Only if the underlying range is a [`common_range`](range-concepts.md#common_range) |
38
+
| **Borrowed range** | Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range) |
39
39
40
40
## Members
41
41
@@ -45,7 +45,7 @@ For a description of the following entries, see [View class characteristics](vie
45
45
| [`base`](#base)<sup>C++20</sup> | Get the underlying view. |
46
46
| [`begin`](#begin)<sup>C++20</sup> | Get an iterator to the first element. |
47
47
| [`end`](#end)<sup>C++20</sup> | Get the sentinel at the end of the view. |
48
-
| [`size`](#size)<sup>C++20</sup> | Get the number of elements in this view. The underlying range must satisfy `sized_range`. |
48
+
| [`size`](#size)<sup>C++20</sup> | Get the number of elements in this view. The underlying range must satisfy [`sized_range`](range-concepts.md#sized_range). |
49
49
| **Inherited from [`view_interface`](view-interface.md)** | **Description** |
50
50
| [`back`](view-interface.md#back)<sup>C++20</sup> | Get the last element. |
51
51
| [`data`](view-interface.md#data)<sup>C++20</sup> | Get a pointer to the first element. |
@@ -196,7 +196,7 @@ The number of elements in the `drop_view`.
196
196
197
197
### Remarks
198
198
199
-
The underlying range must satisfy `sized_range`.
199
+
The underlying range must satisfy [`sized_range`](range-concepts.md#sized_range).
| **Underlying range** | Must satisfy `forward_range` or higher and the underlying range's iterators must model `sized_sentinel_for` |
39
+
| **Underlying range** | Must satisfy [`forward_range`](range-concepts.md#forward_range) or higher and the underlying range's iterators must model `sized_sentinel_for` |
40
40
| **Element type** | Same as the underlying range |
41
41
| **View iterator category** | Same as the underlying range |
42
-
| **Sized** | Only if the underlying range satisfies `random_access_range` |
42
+
| **Sized** | Only if the underlying range satisfies [`random_access_range`](range-concepts.md#random_access_range) |
43
43
| **Is `const`-iterable** | No |
44
-
| **Common range** | Only if the underlying range satisfies `common_range` |
45
-
| **Borrowed range** | Only if the underlying range satisfies `borrowed_range` |
44
+
| **Common range** | Only if the underlying range satisfies [`common_range`](range-concepts.md#common_range) |
45
+
| **Borrowed range** | Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range) |
| **Underlying range** | Must satisfy `input_range` or higher |
35
+
| **Underlying range** | Must satisfy [`input_range`](range-concepts.md#input_range) or higher |
36
36
| **Element type** | Same as the type of the indexed tuple element |
37
-
| **View iterator category** | `forward_range`, `bidirectional_range`, or `random_access_range` |
38
-
| **Sized** | Only if the underlying range satisfies `sized_range` |
37
+
| **View iterator category** | [`forward_range`](range-concepts.md#forward_range), [`bidirectional_range`](range-concepts.md#bidirectional_range), or [`random_access_range`](range-concepts.md#random_access_range) |
38
+
| **Sized** | Only if the underlying range satisfies [`sized_range`](range-concepts.md#sized_range) |
39
39
| **Is `const`-iterable** | Only if the underlying range satisfies `const-iterable` |
40
-
| **Common range** | Only if the underlying range satisfies `common_range` |
41
-
| **Borrowed range** | Only if the underlying range satisfies `borrowed_range` |
40
+
| **Common range** | Only if the underlying range satisfies [`common_range`](range-concepts.md#common_range) |
41
+
| **Borrowed range** | Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range) |
42
42
43
43
## Members
44
44
@@ -48,7 +48,7 @@ For a description of the following entries, see [View class characteristics](vie
48
48
| [`base`](#base)<sup>C++20</sup> | Get the underlying range. |
49
49
| [`begin`](#begin)<sup>C++20</sup> | Get an iterator to the first element. |
50
50
| [`end`](#end)<sup>C++20</sup> | Get the sentinel at the end of the view. |
51
-
| [`size`](#size)<sup>C++20</sup> | Get the number of elements in this view. The underlying range must satisfy `sized_range`. |
51
+
| [`size`](#size)<sup>C++20</sup> | Get the number of elements in this view. The underlying range must satisfy [`sized_range`](range-concepts.md#sized_range). |
52
52
| **Inherited from [`view_interface`](view-interface.md)** | **Description** |
53
53
| [`back`](view-interface.md#back)<sup>C++20</sup> | Get the last element. |
54
54
| [`empty`](view-interface.md#empty)<sup>C++20</sup> | Test whether the `elements_view` is empty. |
@@ -253,7 +253,7 @@ The number of elements in the `elements_view`.
253
253
254
254
### Remarks
255
255
256
-
The size of the view is only available if the underlying range is a `sized_range`, or in other words, bounded.
256
+
The size of the view is only available if the underlying range is a [`sized_range`](range-concepts.md#sized_range), or in other words, bounded.
| **Underlying range** | Must satisfy `input_range` or higher |
36
+
| **Underlying range** | Must satisfy [`input_range`](range-concepts.md#input_range) or higher |
37
37
| **Element type** | Same as the underlying range |
38
-
| **View iterator category** | Supports `input_range`, `forward_range`, or `bidirectional_range` depending on the underlying range |
38
+
| **View iterator category** | Supports `input_range`, [`forward_range`](range-concepts.md#forward_range), or [`bidirectional_range`](range-concepts.md#bidirectional_range) depending on the underlying range |
39
39
| **Sized** | No |
40
40
| **Is `const`-iterable** | No |
41
-
| **Common range** | Only if the underlying range satisfies `common_range` |
42
-
| **Borrowed range** | Only if the underlying range satisfies `borrowed_range` |
41
+
| **Common range** | Only if the underlying range satisfies [`common_range`](range-concepts.md#common_range) |
42
+
| **Borrowed range** | Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range) |
| **Underlying range** | Not applicable because this view generates its members |
37
37
| **Element type** | Same as the template parameter `W` |
38
-
| **View iterator category** | Supports `input_range` up to `random_access_range`, depending on the type of `W` |
38
+
| **View iterator category** | Supports [`input_range`](range-concepts.md#input_range) up to [`random_access_range`](range-concepts.md#random_access_range), depending on the type of `W` |
39
39
| **Sized** | Only if the range has an end value, that is, it isn't an infinite series |
40
40
| **Is `const`-iterable** | Yes |
41
41
| **Common range** | Only if `Bound` is the same type as `W` |
| **Underlying range** | Must satisfy `input_range` or higher |
33
+
| **Underlying range** | Must satisfy [`input_range`](range-concepts.md#input_range) or higher |
34
34
| **Element type** | Same as the underlying range |
35
-
| **View iterator category** | Supports `input_range` up to `bidirectional_range` depending on the underlying range being iterated |
35
+
| **View iterator category** | Supports `input_range` up to [`bidirectional_range`](range-concepts.md#bidirectional_range) depending on the underlying range being iterated |
36
36
| **Sized** | No |
37
37
| **Is `const`-iterable** | Only if the underlying range is `const` iterable |
38
-
| **Common range** | Only if the underlying range satisfies `common_range` |
38
+
| **Common range** | Only if the underlying range satisfies [`common_range`](range-concepts.md#common_range) |
|**Underlying range**| Must satisfy `input_range` or higher |
34
+
|**Underlying range**| Must satisfy [`input_range`](range-concepts.md#input_range) or higher |
35
35
|**Element type**| Same as the type of the first tuple element of the underlying range |
36
-
|**View iterator category**|`random_access_range` if the underlying range is contiguous, otherwise the same as the underlying range |
37
-
|**Sized**| Only if the underlying range satisfies `sized_range`|
36
+
|**View iterator category**|[`random_access_range`](range-concepts.md#random_access_range) if the underlying range is contiguous, otherwise the same as the underlying range |
37
+
|**Sized**| Only if the underlying range satisfies [`sized_range`](range-concepts.md#sized_range)|
38
38
|**Is `const`-iterable**| Only if the underlying range satisfies `const-iterable`|
39
-
|**Common range**| Only if the underlying range satisfies `common_range`|
40
-
|**Borrowed range**| Only if the underlying range satisfies `borrowed_range`|
39
+
|**Common range**| Only if the underlying range satisfies [`common_range`](range-concepts.md#common_range)|
40
+
|**Borrowed range**| Only if the underlying range satisfies [`borrowed_range`](range-concepts.md#borrowed_range)|
41
41
42
42
## Members
43
43
@@ -49,7 +49,7 @@ The following list of member functions refers to the `keys_view` class. Recall t
49
49
|[`base`](#base)<sup>C++20</sup> | Get the underlying range. |
50
50
|[`begin`](#begin)<sup>C++20</sup> | Get an iterator to the first element. |
51
51
|[`end`](#end)<sup>C++20</sup> | Get the sentinel at the end of the view. |
52
-
|[`size`](#size)<sup>C++20</sup> | Get the number of elements. The underlying range must satisfy `sized_range`. |
52
+
|[`size`](#size)<sup>C++20</sup> | Get the number of elements. The underlying range must satisfy [`sized_range`](range-concepts.md#sized_range). |
53
53
|**Inherited from [`view_interface`](view-interface.md)**|**Description**|
54
54
|[`back`](view-interface.md#back)<sup>C++20</sup> | Get the last element. |
55
55
|[`empty`](view-interface.md#empty)<sup>C++20</sup> | Test whether the `keys_view` is empty. |
@@ -237,7 +237,7 @@ The number of elements in the `keys_view`.
237
237
238
238
### Remarks
239
239
240
-
The size of the view is only available if the underlying range is a `sized_range`, or in other words, bounded.
240
+
The size of the view is only available if the underlying range is a [`sized_range`](range-concepts.md#sized_range), or in other words, bounded.
Copy file name to clipboardExpand all lines: docs/standard-library/lazy-split-view-class.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,14 @@ dev_langs: ["C++"]
11
11
12
12
Splits a range into subranges based on a delimiter. The delimiter can be a single element or a view of elements. The delimiter isn't part of the resulting subranges.
13
13
14
-
The primary differences between a `split_view` and a `lazy_split_view` are:
14
+
The primary differences between a [`split_view`](split-view-class.md) and a `lazy_split_view` are:
15
15
16
16
|**View**|**Can split a `const` range**|**range type**|
17
17
|--|--|
18
-
|`split_view`| no | Supports `forward_range` or better. |
19
-
|`lazy_split_view`| yes | Supports `input_range` or better. |
18
+
|`split_view`| no | Supports [`forward_range`](range-concepts.md#forward_range) or higher. |
19
+
|`lazy_split_view`| yes | Supports [`input_range`](range-concepts.md#input_range) or higher. |
20
20
21
-
What makes a `lazy_split_view` "lazy" is that it doesn't lookahead for the next delimiter. That means it can support `input_range` whereas `split_view` requires at least `forward_range`. This is because `input_range` is single-pass whereas `forward_range` allows multi-pass iteration.
21
+
What makes a `lazy_split_view` "lazy" is that it doesn't lookahead for the next delimiter. That means it can support [`input_range`](range-concepts.md#input_range) whereas `split_view` requires at least `forward_range`. This is because `input_range` is single-pass whereas `forward_range` allows multi-pass iteration.
22
22
23
23
Prefer `split_view` because it's more efficient--unless you must split a range that is `const`. Regarding performance, `split_view` is more efficient.
24
24
@@ -38,7 +38,7 @@ class lazy_split_view : public view_interface<lazy_split_view<V, Pattern>>
38
38
39
39
*`Pattern`*\
40
40
The type of the view that specifies a delimiter sequence.\
41
-
The `(forward_range<V> || tiny-range <Pattern>)` requirement means that when the underlying range isn't `forward_range`, the delimiter must be a `tiny_range`. A `tiny_range` is a range with static extent whose size is 0 or 1. `tiny_range<T>` requires `sized_range<T>`, and `T::size()` must be a constant-expression that's less than or equal to 1.
41
+
The `(forward_range<V> || tiny-range <Pattern>)` requirement means that when the underlying range isn't [`forward_range`](range-concepts.md#forward_range), the delimiter must be a `tiny_range`. A `tiny_range` is a range with static extent whose size is 0 or 1. `tiny_range<T>` requires `sized_range<T>`, and `T::size()` must be a constant-expression that's less than or equal to 1.
42
42
43
43
*`V`*\
44
44
The type of the underlying view.
@@ -48,11 +48,11 @@ The `(forward_range<V> || tiny-range <Pattern>)` requirement means that when the
48
48
For a description of the following entries, see [View class characteristics](view-classes.md#view-classes-characteristics)
0 commit comments