Skip to content

Commit b55705c

Browse files
committed
Provide more wording context
1 parent 67a5053 commit b55705c

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

xml/issue4389.xml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,21 @@ requires compilers to add new intrinsics when reflection is absent.
5757
-2- Given a subexpression `E` with type `T`, let `t` be an lvalue that denotes the reified object for `E`. Then:
5858
</p>
5959
<ol style="list-style-type: none">
60-
<li><p>(2.1) &mdash; [&hellip;]</p></li>
61-
<li><p>(2.2) &mdash; [&hellip;]</p></li>
62-
<li><p>(2.3) &mdash; [&hellip;]</p></li>
63-
<li><p>(2.4) &mdash; [&hellip;]</p></li>
60+
<li><p>(2.1) &mdash; If `E` is an rvalue and <tt>enable_borrowed_range&lt;remove_cv_t&lt;T&gt;&gt;</tt> is
61+
`false`, `ranges::begin(E)` is ill-formed.</p></li>
62+
<li><p>(2.2) &mdash; Otherwise, if `T` is an array type (<sref ref="[dcl.array]"/>) and
63+
<tt>remove_all_extents_t&lt;T&gt;</tt> is an incomplete type, `ranges::begin(E)` is
64+
ill-formed with no diagnostic required.</p></li>
65+
<li><p>(2.3) &mdash; Otherwise, if `T` is an array type, `ranges::begin(E)` is
66+
expression-equivalent to `t + 0`.</p></li>
67+
<li><p>(2.4) &mdash; Otherwise, if `auto(t.begin())` is a valid expression whose type models
68+
`input_or_output_iterator`, `ranges::begin(E)` is expression-equivalent to `auto(t.begin())`.</p></li>
6469
<li><p><ins>(2.?) &mdash; Otherwise, if <tt>remove_cvref_t&lt;T&gt;</tt> is a class type and search for
6570
`begin` in the scope of that class finds at least one declaration, `ranges::begin(E)` is ill-formed.</ins></p></li>
66-
<li><p>(2.5) &mdash; [&hellip;]</p></li>
71+
<li><p>(2.5) &mdash; Otherwise, if `T` is a class or enumeration type and `auto(begin(t))`
72+
is a valid expression whose type models `input_or_output_iterator` where the meaning of `begin`
73+
is established as-if by performing argument-dependent lookup only (<sref ref="[basic.lookup.argdep]"/>),
74+
then `ranges::begin(E)` is expression-equivalent to that expression.</p></li>
6775
<li><p>(2.6) &mdash; Otherwise, `ranges::begin(E)` is ill-formed.</p></li>
6876
</ol>
6977
</blockquote>
@@ -76,14 +84,24 @@ requires compilers to add new intrinsics when reflection is absent.
7684
-2- Given a subexpression `E` with type `T`, let `t` be an lvalue that denotes the reified object for `E`. Then:
7785
</p>
7886
<ol style="list-style-type: none">
79-
<li><p>(2.1) &mdash; [&hellip;]</p></li>
80-
<li><p>(2.2) &mdash; [&hellip;]</p></li>
81-
<li><p>(2.3) &mdash; [&hellip;]</p></li>
82-
<li><p>(2.4) &mdash; [&hellip;]</p></li>
83-
<li><p>(2.5) &mdash; [&hellip;]</p></li>
87+
<li><p>(2.1) &mdash; If `E` is an rvalue and <tt>enable_borrowed_range&lt;remove_cv_t&lt;T&gt;&gt;</tt>
88+
is `false`, `ranges::end(E)` is ill-formed.</p></li>
89+
<li><p>(2.2) &mdash; Otherwise, if `T` is an array type (<sref ref="[dcl.array]"/>) and
90+
<tt>remove_all_extents_t&lt;T&gt;</tt> is an incomplete type, `ranges::end(E)` is ill-formed
91+
with no diagnostic required.</p></li>
92+
<li><p>(2.3) &mdash; Otherwise, if `T` is an array of unknown bound, `ranges::end(E)` is ill-formed.</p></li>
93+
<li><p>(2.4) &mdash; Otherwise, if `T` is an array, `ranges::end(E)` is expression-equivalent to
94+
<tt>t + extent_v&lt;T&gt;</tt>.</p></li>
95+
<li><p>(2.5) &mdash; Otherwise, if `auto(t.end())` is a valid expression whose type models
96+
<tt>sentinel_for&lt;iterator_t&lt;T&gt;&gt;</tt> then `ranges::end(E)` is expression-equivalent to
97+
`auto(t.end())`.</p></li>
8498
<li><p><ins>(2.?) &mdash; Otherwise, if <tt>remove_cvref_t&lt;T&gt;</tt> is a class type and search for
8599
`end` in the scope of that class finds at least one declaration, `ranges::end(E)` is ill-formed.</ins></p></li>
86-
<li><p>(2.6) &mdash; [&hellip;]</p></li>
100+
<li><p>(2.6) &mdash; Otherwise, if `T` is a class or enumeration type and `auto(end(t))`
101+
is a valid expression whose type models <tt>sentinel_for&lt;iterator_t&lt;T&gt;&gt;</tt>
102+
where the meaning of end is established as-if by performing argument-dependent
103+
lookup only (<sref ref="[basic.lookup.argdep]"/>), then `ranges::end(E)` is expression-equivalent
104+
to that expression.</p></li>
87105
<li><p>(2.7) &mdash; Otherwise, `ranges::end(E)` is ill-formed.</p></li>
88106
</ol>
89107
</blockquote>

0 commit comments

Comments
 (0)