Skip to content

Commit 97aea91

Browse files
authored
Merge pull request #4247 from MicrosoftDocs/main638024887529657964sync_temp
Repo sync for protected CLA branch
2 parents 5ce76f5 + 668d725 commit 97aea91

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/standard-library/view-classes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ helpviewer_keywords: ["RANGES/VIEWS/std", "VIEWS/std"]
77
---
88
# View classes
99

10-
A *view* is a lightweight range that refers to elements that it doesn't own, except for [`owning_view`](owning-view-class.md)). A view is typically based on another range and provides a different way of looking at it whether by transforming or filtering it. For example, [`std::views::filter`](filter-view-class.md) is a view that uses the criteria you specify to select elements from another range.
10+
A *view* is a lightweight range that refers to elements that it doesn't own, (except for [`owning_view`](owning-view-class.md)). A view is typically based on another range and provides a different way of looking at it, whether by transforming or filtering it. For example, [`std::views::filter`](filter-view-class.md) is a view that uses the criteria you specify to select elements from another range.
1111

12-
When you access the elements in a view, it's done 'lazily' so that work is only done when you get an element. This also makes it possible to combine, or 'compose' views without a performance penalty. For example, you could create a view that provides only the even elements from a range, and then transform them by squaring them. The work to do the filtering and transformation is done only for the elements you access, and only when you access them.
12+
When you access the elements in a view, it's done 'lazily' so that work is only done when you get an element. This also makes it possible to combine, or 'compose' views without a performance penalty. For example, you could create a view that provides only the even elements from a range and then transform them by squaring them. The work to do the filtering and transformation is done only for the elements you access, and only when you access them.
1313

1414
A view can be copied, assigned, and destroyed in constant time no matter how many elements it contains. This is because a view doesn't own the elements it refers to, so it doesn't need to make a copy. This is also why you can compose views without a performance penalty.
1515

@@ -96,9 +96,9 @@ v | rev3(v): 2 1 0
9696

9797
The following view classes are defined in the `std::ranges` namespace.
9898

99-
| **Range adaptor** | **Description** |
99+
| **View ** | **Description** |
100100
|--|--|
101-
| [`basic_istream_view`](basic-istream-class.md)<sup>C++20</sup> | A view of successive elements from an input stream. |
101+
| [`basic_istream_view`](basic-istream-view-class.md)<sup>C++20</sup> | A view of successive elements from an input stream. |
102102
| [`common_view`](common-view-class.md)<sup>C++20</sup> | Adapts a view that has different iterator/sentinel types into a view with the same iterator/sentinel types. |
103103
| [`drop_view`](drop-view-class.md)<sup>C++20</sup> | Created from another view, skipping the first `count` elements. |
104104
| [`drop_while_view`](drop-while-view-class.md)<sup>C++20</sup> | Created from another view, skipping leading elements as long as a predicate holds. |

0 commit comments

Comments
 (0)