|
13 | 13 | `cache_latest_view` can be freestanding, but this never comes up in the discussion, which seems to be an oversight. |
14 | 14 | </p> |
15 | 15 |
|
16 | | -</discussion> |
17 | | - |
18 | | -<resolution> |
| 16 | +<superseded> |
19 | 17 | <p> |
20 | 18 | This wording is relative to <paper num="N5001"/>. |
21 | 19 | </p> |
@@ -49,6 +47,64 @@ namespace std::ranges { |
49 | 47 | </pre></blockquote> |
50 | 48 | </li> |
51 | 49 | </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><ranges></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> <ranges> |
| 70 | +</pre></blockquote> |
| 71 | + |
| 72 | +</li> |
| 73 | + |
| 74 | +<li><p>Delete all "// <i>freestanding</i>" comments in <sref ref="[ranges.syn]"/>, header <tt><ranges></tt> |
| 75 | +synopsis, and then modify as indicated:</p> |
| 76 | + |
| 77 | +<blockquote><pre> |
| 78 | +<ins>// <i>mostly freestanding</i></ins> |
| 79 | +#include <compare> // <i>see <sref ref="[compare.syn]"/></i> |
| 80 | +#include <initializer_list> // <i>see <sref ref="[initializer.list.syn]"/></i> |
| 81 | +#include <iterator> // <i>see <sref ref="[iterator.synopsis]"/></i> |
| 82 | + |
| 83 | +[…] |
| 84 | +namespace std::ranges { |
| 85 | + // <i><sref ref="[range.elementsof]"/>, class template elements_of</i> |
| 86 | + template<range R, class Allocator = allocator<byte>> |
| 87 | + struct elements_of; <ins>// <i>hosted</i></ins> |
| 88 | + […] |
| 89 | + |
| 90 | + // <i><sref ref="[range.istream]"/>, istream view</i> |
| 91 | + template<movable Val, class CharT, class Traits = char_traits<CharT>> |
| 92 | + requires <i>see below</i> |
| 93 | + class basic_istream_view; <ins>// <i>hosted</i></ins> |
| 94 | + template<class Val> |
| 95 | + using istream_view = basic_istream_view<Val, char>; <ins>// <i>hosted</i></ins> |
| 96 | + template<class Val> |
| 97 | + using wistream_view = basic_istream_view<Val, wchar_t>; <ins>// <i>hosted</i></ins> |
| 98 | + |
| 99 | + namespace views { |
| 100 | + template<class T> constexpr <i>unspecified</i> istream = <i>unspecified</i>; <ins>// <i>hosted</i></ins> |
| 101 | + } |
| 102 | + […] |
| 103 | +} |
| 104 | +[…] |
| 105 | +</pre></blockquote> |
| 106 | +</li> |
| 107 | +</ol> |
52 | 108 |
|
53 | 109 | </resolution> |
54 | 110 |
|
|
0 commit comments