Skip to content

Commit 6c3bdae

Browse files
committed
Alternative P/R from Tim Song (Hewill agrees)
1 parent e2aac18 commit 6c3bdae

File tree

1 file changed

+59
-3
lines changed

1 file changed

+59
-3
lines changed

xml/issue4189.xml

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
`cache_latest_view` can be freestanding, but this never comes up in the discussion, which seems to be an oversight.
1414
</p>
1515

16-
</discussion>
17-
18-
<resolution>
16+
<superseded>
1917
<p>
2018
This wording is relative to <paper num="N5001"/>.
2119
</p>
@@ -49,6 +47,64 @@ namespace std::ranges {
4947
</pre></blockquote>
5048
</li>
5149
</ol>
50+
</superseded>
51+
52+
<note>2025-01-04; Tim Song suggests alternative wording</note>
53+
<p>
54+
While we are here, we can use the new convention from <paper num="P2407"/> to dramatically simplify
55+
<tt>&lt;ranges&gt;</tt>. Most future additions to this header should have no problem being freestanding,
56+
so that is the right default.
57+
</p>
58+
</discussion>
59+
60+
<resolution>
61+
<p>
62+
This wording is relative to <paper num="N5001"/>.
63+
</p>
64+
65+
<ol>
66+
<li><p>Modify <sref ref="[version.syn]"/> as indicated:</p>
67+
68+
<blockquote><pre>
69+
#define __cpp_lib_ranges_cache_latest 202411L // <ins><i>freestanding</i>,</ins> <i>also in</i> &lt;ranges&gt;
70+
</pre></blockquote>
71+
72+
</li>
73+
74+
<li><p>Delete all "// <i>freestanding</i>" comments in <sref ref="[ranges.syn]"/>, header <tt>&lt;ranges&gt;</tt>
75+
synopsis, and then modify as indicated:</p>
76+
77+
<blockquote><pre>
78+
<ins>// <i>mostly freestanding</i></ins>
79+
#include &lt;compare&gt; // <i>see <sref ref="[compare.syn]"/></i>
80+
#include &lt;initializer_list&gt; // <i>see <sref ref="[initializer.list.syn]"/></i>
81+
#include &lt;iterator&gt; // <i>see <sref ref="[iterator.synopsis]"/></i>
82+
83+
[&hellip;]
84+
namespace std::ranges {
85+
// <i><sref ref="[range.elementsof]"/>, class template elements_of</i>
86+
template&lt;range R, class Allocator = allocator&lt;byte&gt;&gt;
87+
struct elements_of; <ins>// <i>hosted</i></ins>
88+
[&hellip;]
89+
90+
// <i><sref ref="[range.istream]"/>, istream view</i>
91+
template&lt;movable Val, class CharT, class Traits = char_traits&lt;CharT&gt;&gt;
92+
requires <i>see below</i>
93+
class basic_istream_view; <ins>// <i>hosted</i></ins>
94+
template&lt;class Val&gt;
95+
using istream_view = basic_istream_view&lt;Val, char&gt;; <ins>// <i>hosted</i></ins>
96+
template&lt;class Val&gt;
97+
using wistream_view = basic_istream_view&lt;Val, wchar_t&gt;; <ins>// <i>hosted</i></ins>
98+
99+
namespace views {
100+
template&lt;class T&gt; constexpr <i>unspecified</i> istream = <i>unspecified</i>; <ins>// <i>hosted</i></ins>
101+
}
102+
[&hellip;]
103+
}
104+
[&hellip;]
105+
</pre></blockquote>
106+
</li>
107+
</ol>
52108

53109
</resolution>
54110

0 commit comments

Comments
 (0)