Skip to content

Commit b1847aa

Browse files
committed
Deploying to gh-pages from @ e4007d4 🚀
1 parent 49cbc69 commit b1847aa

File tree

2 files changed

+85
-27
lines changed

2 files changed

+85
-27
lines changed

any_view.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -837,23 +837,33 @@ namespace std::ranges {
837837
838838
## `any_view`
839839
840-
Add the floolwing subclause to [range.utility]{.sref}
840+
Add the following subclause to [range.utility]{.sref}
841841
842842
### ?.?.? Any view [range.any] {-}
843843
844-
#### ?.?.?.1 General [range.any.general] {-}
844+
#### ?.?.?.1 Definition [range.any.def] {-}
845845
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] {-}
847857
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.
849860
850861
[2]{.pnum} Recommended practice: Implementations should avoid the use of dynamically allocated memory for a small contained value.
851862
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]
853864
854-
:::
855865
856-
#### ?.?.?.2 Class template `any_view` [range.any.class] {-}
866+
#### ?.?.?.3 Class template `any_view` [range.any.class] {-}
857867
858868
```cpp
859869
template <class Element,
@@ -880,7 +890,7 @@ public:
880890
constexpr @*iterator*@ begin();
881891
constexpr @*sentinel*@ end();
882892
883-
constexpr @*make-unsigned-like-t<Diff>*@ size() const requires @*see below*@;
893+
constexpr @*make-unsigned-like-t*@<Diff> size() const requires @*see below*@;
884894
};
885895
```
886896

@@ -905,23 +915,41 @@ using @*rvalue-ref-t*@ = typename @*rvalue-ref*@<T>::type;
905915
906916
:::
907917
908-
#### ?.?.?.4 Range access [range.any.class] {-}
918+
#### ?.?.?.4 Range access [range.any.access] {-}
909919
910920
```cpp
911921
constexpr @*iterator*@ begin();
912922
```
913923

914924
:::bq
915925

916-
[1]{.pnum} *Preconditions*: `*this` has a target object.
926+
[1]{.pnum} *Preconditions*: `*this` has a *target object*.
917927

918928
[2]{.pnum} *Effects*: Equivalent to:
919929

920930
```cpp
921931
return @*iterator*@(ranges::begin(v));
922932
```
923933

924-
where `v` is an lvalue designating the target object of `*this`
934+
where `v` is an lvalue designating the *target object* of `*this`
935+
936+
:::
937+
938+
```cpp
939+
constexpr @*sentinel*@ end();
940+
```
941+
942+
:::bq
943+
944+
[1]{.pnum} *Preconditions*: `*this` has a *target object*.
945+
946+
[2]{.pnum} *Effects*: Equivalent to:
947+
948+
```cpp
949+
return @*sentinel*@(ranges::end(v));
950+
```
951+
952+
where `v` is an lvalue designating the *target object* of `*this`
925953

926954
:::
927955
---

generated/any_view.html

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,27 +1405,46 @@ <h2 data-number="9.1" id="addition-to-ranges"><span class="header-section-number
14051405
<span id="cb31-27"><a href="#cb31-27" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span></code></pre></div>
14061406
<h2 data-number="9.2" id="any_view"><span class="header-section-number">9.2</span>
14071407
<code class="sourceCode cpp">any_view</code><a href="#any_view" class="self-link"></a></h2>
1408-
<p>Add the floolwing subclause to <span>25.5
1408+
<p>Add the following subclause to <span>25.5
14091409
<a href="https://wg21.link/range.utility">[range.utility]</a></span></p>
14101410
<h3 class="unnumbered" id="any-view-range.any">?.?.? Any view
14111411
[range.any]<a href="#any-view-range.any" class="self-link"></a></h3>
1412-
<h4 class="unnumbered" id="general-range.any.general">?.?.?.1 General
1412+
<h4 class="unnumbered" id="definition-range.any.def">?.?.?.1 Definition
1413+
[range.any.def]<a href="#definition-range.any.def" class="self-link"></a></h4>
1414+
<p><span class="marginalizedparent"><a class="marginalized">1</a></span>
1415+
The following definitions apply to this Clause:</p>
1416+
<p><span class="marginalizedparent"><a class="marginalized">2</a></span>
1417+
A <em>view object</em> is an object of type which models
1418+
<code class="sourceCode cpp">ranges<span class="op">::</span>view</code>
1419+
(<span>25.4.4
1420+
<a href="https://wg21.link/range.view">[range.view]</a></span>)
1421+
concept.</p>
1422+
<p><span class="marginalizedparent"><a class="marginalized">3</a></span>
1423+
A <em>view wrapper type</em> is a type that holds a view object and
1424+
supports <code class="sourceCode cpp">ranges<span class="op">::</span>begin</code> and
1425+
<code class="sourceCode cpp">ranges<span class="op">::</span>end</code>
1426+
operation that forwards to that object.</p>
1427+
<p><span class="marginalizedparent"><a class="marginalized">4</a></span>
1428+
A <em>view wrapper</em> is an object of <em>view wrapper type</em>.</p>
1429+
<p><span class="marginalizedparent"><a class="marginalized">5</a></span>
1430+
A <em>target object</em> is the <em>view object</em> held by a <em>view
1431+
wrapper</em>.</p>
1432+
<h4 class="unnumbered" id="general-range.any.general">?.?.?.2 General
14131433
[range.any.general]<a href="#general-range.any.general" class="self-link"></a></h4>
1414-
<div class="bq">
14151434
<p><span class="marginalizedparent"><a class="marginalized">1</a></span>
14161435
The <code class="sourceCode cpp">any_view</code> class template provides
1417-
polymorphic wrappers that generalize the notion of a view object
1418-
(<span>25.4.4
1419-
<a href="https://wg21.link/range.view">[range.view]</a></span>). These
1420-
wrappers can store, move, and call arbitrary view objects, given the
1421-
view element types and the view category.</p>
1436+
polymorphic wrappers that generalize the notion of a <em>view
1437+
object</em>. These wrappers can store, move, and traverse arbitrary
1438+
<em>view object</em>s, given the view element types and the view
1439+
category.</p>
14221440
<p><span class="marginalizedparent"><a class="marginalized">2</a></span>
14231441
Recommended practice: Implementations should avoid the use of
14241442
dynamically allocated memory for a small contained value.</p>
14251443
<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-
<h4 class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.2 Class template
1444+
<code class="sourceCode cpp">T</code> for which <code class="sourceCode cpp">is_nothrow_move_constructible_v<span class="op">&lt;</span>T<span class="op">&gt;</span></code>
1445+
is <code class="sourceCode cpp"><span class="kw">true</span></code>. —
1446+
end note]</p>
1447+
<h4 class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.3 Class template
14291448
<code class="sourceCode cpp">any_view</code> [range.any.class]<a href="#class-template-any_view-range.any.class" class="self-link"></a></h4>
14301449
<div class="sourceCode" id="cb32"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">class</span> Element,</span>
14311450
<span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a> any_view_options Opts <span class="op">=</span> any_view_options<span class="op">::</span>input,</span>
@@ -1451,7 +1470,7 @@ <h4 class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.2 Clas
14511470
<span id="cb32-22"><a href="#cb32-22" aria-hidden="true" tabindex="-1"></a> <span class="kw">constexpr</span> <em>iterator</em> begin<span class="op">()</span>;</span>
14521471
<span id="cb32-23"><a href="#cb32-23" aria-hidden="true" tabindex="-1"></a> <span class="kw">constexpr</span> <em>sentinel</em> end<span class="op">()</span>;</span>
14531472
<span id="cb32-24"><a href="#cb32-24" aria-hidden="true" tabindex="-1"></a></span>
1454-
<span id="cb32-25"><a href="#cb32-25" aria-hidden="true" tabindex="-1"></a> <span class="kw">constexpr</span> <em>make-unsigned-like-t<Diff></em> size<span class="op">()</span> <span class="kw">const</span> <span class="kw">requires</span> <em>see below</em>;</span>
1473+
<span id="cb32-25"><a href="#cb32-25" aria-hidden="true" tabindex="-1"></a> <span class="kw">constexpr</span> <em>make-unsigned-like-t</em><span class="op">&lt;</span>Diff<span class="op">&gt;</span> size<span class="op">()</span> <span class="kw">const</span> <span class="kw">requires</span> <em>see below</em>;</span>
14551474
<span id="cb32-26"><a href="#cb32-26" aria-hidden="true" tabindex="-1"></a><span class="op">}</span>;</span></code></pre></div>
14561475
<div class="bq">
14571476
<p><span class="marginalizedparent"><a class="marginalized">1</a></span>
@@ -1471,18 +1490,29 @@ <h4 class="unnumbered" id="class-template-any_view-range.any.class">?.?.?.2 Clas
14711490
<span id="cb33-11"><a href="#cb33-11" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span> <span class="op">&lt;</span><span class="kw">class</span> T<span class="op">&gt;</span></span>
14721491
<span id="cb33-12"><a href="#cb33-12" aria-hidden="true" tabindex="-1"></a><span class="kw">using</span> <em>rvalue-ref-t</em> <span class="op">=</span> <span class="kw">typename</span> <em>rvalue-ref</em><span class="op">&lt;</span>T<span class="op">&gt;::</span>type;</span></code></pre></div>
14731492
</div>
1474-
<h4 class="unnumbered" id="range-access-range.any.class">?.?.?.4 Range
1475-
access [range.any.class]<a href="#range-access-range.any.class" class="self-link"></a></h4>
1493+
<h4 class="unnumbered" id="range-access-range.any.access">?.?.?.4 Range
1494+
access [range.any.access]<a href="#range-access-range.any.access" class="self-link"></a></h4>
14761495
<div class="sourceCode" id="cb34"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <em>iterator</em> begin<span class="op">()</span>;</span></code></pre></div>
14771496
<div class="bq">
14781497
<p><span class="marginalizedparent"><a class="marginalized">1</a></span>
14791498
<em>Preconditions</em>: <code class="sourceCode cpp"><span class="op">*</span><span class="kw">this</span></code>
1480-
has a target object.</p>
1499+
has a <em>target object</em>.</p>
14811500
<p><span class="marginalizedparent"><a class="marginalized">2</a></span>
14821501
<em>Effects</em>: Equivalent to:</p>
14831502
<div class="sourceCode" id="cb35"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> <em>iterator</em><span class="op">(</span>ranges<span class="op">::</span>begin<span class="op">(</span>v<span class="op">))</span>;</span></code></pre></div>
14841503
<p>where <code class="sourceCode cpp">v</code> is an lvalue designating
1485-
the target object of <code class="sourceCode cpp"><span class="op">*</span><span class="kw">this</span></code></p>
1504+
the <em>target object</em> of <code class="sourceCode cpp"><span class="op">*</span><span class="kw">this</span></code></p>
1505+
</div>
1506+
<div class="sourceCode" id="cb36"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="kw">constexpr</span> <em>sentinel</em> end<span class="op">()</span>;</span></code></pre></div>
1507+
<div class="bq">
1508+
<p><span class="marginalizedparent"><a class="marginalized">1</a></span>
1509+
<em>Preconditions</em>: <code class="sourceCode cpp"><span class="op">*</span><span class="kw">this</span></code>
1510+
has a <em>target object</em>.</p>
1511+
<p><span class="marginalizedparent"><a class="marginalized">2</a></span>
1512+
<em>Effects</em>: Equivalent to:</p>
1513+
<div class="sourceCode" id="cb37"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> <em>sentinel</em><span class="op">(</span>ranges<span class="op">::</span>end<span class="op">(</span>v<span class="op">))</span>;</span></code></pre></div>
1514+
<p>where <code class="sourceCode cpp">v</code> is an lvalue designating
1515+
the <em>target object</em> of <code class="sourceCode cpp"><span class="op">*</span><span class="kw">this</span></code></p>
14861516
</div>
14871517
<style>
14881518
.bq{

0 commit comments

Comments
 (0)