File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+ <issue num =" 4397" status =" New" >
5+ <title >Improve <code >span(R&& r)</code ></title >
6+ <section ><sref ref =" [span.cons]" /></section >
7+ <submitter >Hewill Kang</submitter >
8+ <date >02 Oct 2025</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ It is preferable to reject <code >span< int, 42> (views::empty< int> )</code >
14+ at compile-time after <paper num =" P2280R4" />, since applying `ranges::size` on those
15+ ranges is a constant expression now.
16+ </p >
17+ </discussion >
18+
19+ <resolution >
20+ <p >
21+ This wording is relative to <paper num =" N5014" />.
22+ </p >
23+
24+ <ol >
25+
26+ <li ><p >Modify <sref ref =" [span.cons]" /> as indicated:</p >
27+
28+ <blockquote >
29+ <pre >
30+ template< class R> constexpr explicit(extent != dynamic_extent) span(R&& r);
31+ </pre >
32+ <blockquote >
33+ <p >
34+ <ins >-?- <i >Mandates</i >: If `extent` is not equal to `dynamic_extent` and `ranges::size(r)` is a
35+ constant expression, then `ranges::size(r) == extent` is `true`.</ins >
36+ <p />
37+ -16- <i >Constraints</i >: Let `U` be <code >remove_reference_t< ranges::range_reference_t< R>> </code >.
38+ [… ]
39+ </p >
40+ </blockquote >
41+ </blockquote >
42+ </li >
43+ </ol >
44+
45+ </resolution >
46+
47+ </issue >
You can’t perform that action at this time.
0 commit comments