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
Copy file name to clipboardExpand all lines: any_view.md
+39-11Lines changed: 39 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -837,23 +837,33 @@ namespace std::ranges {
837
837
838
838
## `any_view`
839
839
840
-
Add the floolwing subclause to [range.utility]{.sref}
840
+
Add the following subclause to [range.utility]{.sref}
841
841
842
842
### ?.?.? Any view [range.any] {-}
843
843
844
-
#### ?.?.?.1 General [range.any.general] {-}
844
+
#### ?.?.?.1 Definition [range.any.def] {-}
845
845
846
-
:::bq
846
+
[1]{.pnum} The following definitions apply to this Clause:
847
+
848
+
[2]{.pnum} A *view object* is an object of type which models `ranges::view` ([range.view]{.sref}) concept.
849
+
850
+
[3]{.pnum} A *view wrapper type* is a type that holds a view object and supports `ranges::begin` and `ranges::end` operation that forwards to that object.
851
+
852
+
[4]{.pnum} A *view wrapper* is an object of *view wrapper type*.
853
+
854
+
[5]{.pnum} A *target object* is the *view object* held by a *view wrapper*.
855
+
856
+
#### ?.?.?.2 General [range.any.general] {-}
847
857
848
-
[1]{.pnum} The `any_view` class template provides polymorphic wrappers that generalize the notion of a view object ([range.view]{.sref}). These wrappers can store, move, and call arbitrary view objects, given the view element types and the view category.
858
+
859
+
[1]{.pnum} The `any_view` class template provides polymorphic wrappers that generalize the notion of a *view object*. These wrappers can store, move, and traverse arbitrary *view object*s, given the view element types and the view category.
849
860
850
861
[2]{.pnum} Recommended practice: Implementations should avoid the use of dynamically allocated memory for a small contained value.
851
862
852
-
[Note 1: Such small-object optimization can only be applied to a type T for which is_nothrow_move_constructible_v<T> is true. — end note]
863
+
[Note 1: Such small-object optimization can only be applied to a type `T` for which `is_nothrow_move_constructible_v<T>` is `true`. — end note]
853
864
854
-
:::
855
865
856
-
#### ?.?.?.2 Class template `any_view` [range.any.class] {-}
866
+
#### ?.?.?.3 Class template `any_view` [range.any.class] {-}
Recommended practice: Implementations should avoid the use of
1424
1442
dynamically allocated memory for a small contained value.</p>
1425
1443
<p>[Note 1: Such small-object optimization can only be applied to a type
1426
-
T for which is_nothrow_move_constructible_v<T> is true. — end note]</p>
1427
-
</div>
1428
-
<h4class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.2 Class template
1444
+
<codeclass="sourceCode cpp">T</code> for which <codeclass="sourceCode cpp">is_nothrow_move_constructible_v<spanclass="op"><</span>T<spanclass="op">></span></code>
1445
+
is <codeclass="sourceCode cpp"><spanclass="kw">true</span></code>. —
1446
+
end note]</p>
1447
+
<h4class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.3 Class template
0 commit comments