Skip to content

Commit 1463af3

Browse files
committed
Hewill provides revised wording
1 parent 51d8e67 commit 1463af3

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

xml/issue4243.xml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ int main() {
2525
auto writable_bytes = as_writable_bytes(span); // <span style="color:#C80000;font-weight:bold">hard error</span>
2626
}
2727
</pre></blockquote>
28-
</discussion>
2928

30-
<resolution>
29+
<superseded>
3130
<p>
3231
This wording is relative to <paper num="N5008"/>.
3332
</p>
@@ -95,6 +94,59 @@ where `R` is the return type.
9594

9695
</li>
9796

97+
</ol>
98+
</superseded>
99+
100+
<note>2025-04-16; Hewill Kang provides alternative wording</note>
101+
<p>
102+
Based on reflector feedback, the revised wording just improves the current state of not supporting
103+
support for `volatile`.
104+
</p>
105+
</discussion>
106+
107+
<resolution>
108+
<p>
109+
This wording is relative to <paper num="N5008"/>.
110+
</p>
111+
112+
<ol>
113+
114+
<li><p>Modify <sref ref="[span.objectrep]"/> as indicated:</p>
115+
116+
<blockquote>
117+
<pre>
118+
template&lt;class ElementType, size_t Extent&gt;
119+
span&lt;const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent&gt;
120+
as_bytes(span&lt;ElementType, Extent&gt; s) noexcept;
121+
</pre>
122+
<blockquote>
123+
<p>
124+
<ins>-?- <i>Constraints</i>: <code>is_volatile_v&lt;ElementType&gt;</code> is `false`.</ins>
125+
</p>
126+
<p>
127+
-1- <i>Effects</i>: Equivalent to: <code>return R{reinterpret_cast&lt;const byte*&gt;(s.data()), s.size_bytes()};</code><br/>
128+
where <code>R</code> is the return type.
129+
</p>
130+
</blockquote>
131+
<pre>
132+
template&lt;class ElementType, size_t Extent&gt;
133+
span&lt;byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent&gt;
134+
as_writable_bytes(span&lt;ElementType, Extent&gt; s) noexcept;
135+
</pre>
136+
<blockquote>
137+
<p>
138+
-2- <i>Constraints</i>: <code>is_const_v&lt;ElementType&gt;</code> is `false` <ins>and
139+
<code>is_volatile_v&lt;ElementType&gt;</code> is `false`</ins>.
140+
</p>
141+
<p>
142+
-3- <i>Effects</i>: Equivalent to: <code>return R{reinterpret_cast&lt;byte*&gt;(s.data()), s.size_bytes()};</code><br/>
143+
where `R` is the return type.
144+
</p>
145+
</blockquote>
146+
</blockquote>
147+
148+
</li>
149+
98150
</ol>
99151
</resolution>
100152

0 commit comments

Comments
 (0)