Skip to content

Commit 767e46f

Browse files
committed
New issue from Aiden Grossman: "std::dynamic_extent should also be defined in <mdspan>"
1 parent 115bcae commit 767e46f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

xml/issue4275.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4275" status="New">
5+
<title>`std::dynamic_extent` should also be defined in <tt>&lt;mdspan&gt;</tt></title>
6+
<section>
7+
<sref ref="[time.hms.members]"/>
8+
</section>
9+
<submitter>Aiden Grossman</submitter>
10+
<date>06 Jun 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
`std::dynamic_extent` can be used in certain circumstances in `std::mdspan`,
16+
such as with padded layouts. However, `std::dynamic_extent` is currently only
17+
defined in <tt>&lt;span&gt;</tt> which necessitates including <tt>&lt;span&gt;</tt>
18+
solely for the `std::dynamic_extent` definition.
19+
</p>
20+
</discussion>
21+
22+
<resolution>
23+
<p>
24+
This wording is relative to <paper num="N5008"/>.
25+
</p>
26+
27+
<ol>
28+
<li><p>Modify <sref ref="[mdspan.syn]"/>, header <tt>&lt;span&gt;</tt> synopsis, as indicated:</p>
29+
30+
<blockquote>
31+
<pre>
32+
<i>// all freestanding</i>
33+
namespace std {
34+
<ins><i>// constants</i></ins>
35+
<ins>inline constexpr size_t dynamic_extent = numeric_limits&lt;size_t&gt;::max();</ins>
36+
37+
<i>// <sref ref="[mdspan.extents]"/>, class template extents</i>
38+
template&lt;class IndexType, size_t... Extents&gt;
39+
class extents;
40+
41+
[&hellip;]
42+
}
43+
</pre>
44+
</blockquote>
45+
</li>
46+
47+
</ol>
48+
</resolution>
49+
50+
</issue>

0 commit comments

Comments
 (0)