|
79 | 79 | </tr> |
80 | 80 | </table> |
81 | 81 | <h1>C++ Standard Library Active Issues List (Revision D125)</h1> |
82 | | -<p>Revised 2025-03-22 at 15:52:05 UTC |
| 82 | +<p>Revised 2025-03-22 at 16:28:34 UTC |
83 | 83 | </p> |
84 | 84 | <p>Reference ISO/IEC IS 14882:2020(E)</p> |
85 | 85 | <p>Also see:</p> |
@@ -43931,7 +43931,7 @@ <h3 id="3812"><a href="#3812">3812</a><sup><a href="https://cplusplus.github.io/ |
43931 | 43931 | <hr> |
43932 | 43932 | <h3 id="3813"><a href="#3813">3813</a><sup><a href="https://cplusplus.github.io/LWG/issue3813">(i)</a></sup>. <code>std::span<volatile T, E></code> is made ill-formed by P2278R4 when <code>T</code> is a normal class type</h3> |
43933 | 43933 | <p><b>Section:</b> 23.7.2.2.1 <a href="https://wg21.link/span.overview">[span.overview]</a> <b>Status:</b> <a href="lwg-active.html#New">New</a> |
43934 | | - <b>Submitter:</b> Jiang An <b>Opened:</b> 2022-11-06 <b>Last modified:</b> 2022-11-12</p> |
| 43934 | + <b>Submitter:</b> Jiang An <b>Opened:</b> 2022-11-06 <b>Last modified:</b> 2025-03-22</p> |
43935 | 43935 | <p><b>Priority: </b>2 |
43936 | 43936 | </p> |
43937 | 43937 | <p><b>View all other</b> <a href="lwg-index.html#span.overview">issues</a> in [span.overview].</p> |
@@ -43969,9 +43969,126 @@ <h3 id="3813"><a href="#3813">3813</a><sup><a href="https://cplusplus.github.io/ |
43969 | 43969 | <p><i>[Kona 2022-11-12; Set priority to 2]</i></p> |
43970 | 43970 |
|
43971 | 43971 |
|
| 43972 | +<p><i>[2025-03-22; Jiang An comments and provides wording]</i></p> |
| 43973 | + |
| 43974 | +<p> |
| 43975 | +The proposed resolution relaxes the <code class='backtick'>input_iterator</code> concept (which in turn relaxes stronger iterator concepts) |
| 43976 | +and extends <code class='backtick'>iter_const_reference_t</code> and the exposition only <code><i>iter-const-rvalue-reference-t</i></code> |
| 43977 | +aliases. Another approach can be just relaxing the <code class='backtick'>indirectly_readable</code> concept, but its impact may be larger |
| 43978 | +than expected. |
| 43979 | +</p> |
43972 | 43980 |
|
43973 | 43981 |
|
43974 | 43982 | <p id="res-3813"><b>Proposed resolution:</b></p> |
| 43983 | +<p> |
| 43984 | +This wording is relative to <a href="https://wg21.link/N5008">N5008</a>. |
| 43985 | +</p> |
| 43986 | + |
| 43987 | +<ol> |
| 43988 | + |
| 43989 | +<li><p>Modify 24.2 <a href="https://wg21.link/iterator.synopsis">[iterator.synopsis]</a>, header <code><iterator></code> synopsis, as indicated:</p> |
| 43990 | + |
| 43991 | +<blockquote> |
| 43992 | +<pre> |
| 43993 | +[…] |
| 43994 | +<i>// 24.3.4.9 <a href="https://wg21.link/iterator.concept.input">[iterator.concept.input]</a>, concept input_iterator</i> |
| 43995 | +<ins>template<class I> |
| 43996 | + concept <i>deref-to-value-t</i> = <i>see below</i>; <i>// freestanding</i> |
| 43997 | + |
| 43998 | +template<class I> |
| 43999 | + concept <i>weakly-indirectly-readable</i> = <i>see below</i>; <i>// freestanding</i></ins> |
| 44000 | + |
| 44001 | +template<class I> |
| 44002 | +concept input_iterator = <i>see below</i>; <i>// freestanding</i> |
| 44003 | + |
| 44004 | +[…] |
| 44005 | + |
| 44006 | +<i>// 24.5.3.2 <a href="https://wg21.link/const.iterators.alias">[const.iterators.alias]</a>, alias templates</i> |
| 44007 | +template<<del>indirectly_readable</del><ins><i>weakly-indirectly-readable</i></ins> I> |
| 44008 | + using iter_const_reference_t = <i>see below</i>; |
| 44009 | +</pre> |
| 44010 | +</blockquote> |
| 44011 | +</li> |
| 44012 | + |
| 44013 | +<li><p>Modify 24.3.4.9 <a href="https://wg21.link/iterator.concept.input">[iterator.concept.input]</a>, concept <code>input_iterator</code> synopsis, as indicated:</p> |
| 44014 | + |
| 44015 | +<blockquote> |
| 44016 | +<pre> |
| 44017 | +<ins>template<class I> |
| 44018 | + concept <i>deref-to-value-t-impl</i> = <i>// exposition only</i> |
| 44019 | + same_as<remove_cvref_t<iter_reference_t<I>>, iter_value_t<I>> && |
| 44020 | + is_object_v<iter_value_t<I>>; |
| 44021 | + |
| 44022 | +template<class I> |
| 44023 | + concept <i>deref-to-value-t</i> = <i>// exposition only</i> |
| 44024 | + <i>deref-to-value-t-impl</i><remove_cvref_t<I>>; |
| 44025 | + |
| 44026 | +template<class I> |
| 44027 | + concept <i>weakly-indirectly-readable</i> = <i>// exposition only</i> |
| 44028 | + <i>deref-to-value-t</i><I> || |
| 44029 | + indirectly_readable<I>;</ins> |
| 44030 | + |
| 44031 | +template<class I> |
| 44032 | + concept input_iterator = |
| 44033 | + input_or_output_iterator<I> && |
| 44034 | + <del>indirectly_readable</del><ins><i>weakly-indirectly-readable</i></ins><I> && |
| 44035 | + requires { typename <i>ITER_CONCEPT</i>(I); } && |
| 44036 | + derived_from<<i>ITER_CONCEPT</i>(I), input_iterator_tag>; |
| 44037 | +</pre> |
| 44038 | +</blockquote> |
| 44039 | +</li> |
| 44040 | + |
| 44041 | +<li><p>Modify 24.5.3.2 <a href="https://wg21.link/const.iterators.alias">[const.iterators.alias]</a> as indicated:</p> |
| 44042 | + |
| 44043 | +<blockquote> |
| 44044 | +<pre> |
| 44045 | +<ins>template<class T> |
| 44046 | + using <i>ref-add-const-t</i> = <i>see below</i>;</ins> |
| 44047 | +</pre> |
| 44048 | +<blockquote> |
| 44049 | +<p> |
| 44050 | +<ins>-?- <i>Result</i>: If <code>is_lvalue_reference_v<T></code> is <code class='backtick'>true</code>, |
| 44051 | +<code>const remove_reference_t<T>&</code>. Otherwise, if <code>is_rvalue_reference_v<T></code> |
| 44052 | +is <code class='backtick'>true</code>, <code>const remove_reference_t<T>&&</code>. Otherwise, <code>T</code>.</ins> |
| 44053 | +</p> |
| 44054 | +</blockquote> |
| 44055 | +<pre> |
| 44056 | +template<<del>indirectly_readable</del><ins><i>weakly-indirectly-readable</i></ins> It> |
| 44057 | + using iter_const_reference_t = <ins>see below;</ins> |
| 44058 | + <del>common_reference_t<const iter_value_t<It>&&, iter_reference_t<It>>;</del> |
| 44059 | +</pre> |
| 44060 | +<blockquote> |
| 44061 | +<p> |
| 44062 | +<ins>-?- <i>Result</i>: If <code class='backtick'>It</code> models <code><i>deref-to-value-t</i></code>, |
| 44063 | +<code><i>ref-add-const-t</i><iter_reference_t<It>></code>. Otherwise, |
| 44064 | +<code>common_reference_t<const iter_value_t<It>&&, iter_reference_t<It>></code>.</ins> |
| 44065 | +</p> |
| 44066 | +</blockquote> |
| 44067 | +</blockquote> |
| 44068 | + |
| 44069 | +<blockquote class="note"> |
| 44070 | +<p> |
| 44071 | +[<i>Drafting note</i>: The simple <code><i>deref-to-value-t</i></code> case should be detected first, |
| 44072 | +which avoids unnecessary instantiations and IFNDR-ness.] |
| 44073 | +</p> |
| 44074 | +</blockquote> |
| 44075 | + |
| 44076 | +</li> |
| 44077 | + |
| 44078 | +<li><p>Modify 24.5.3.3 <a href="https://wg21.link/const.iterators.iterator">[const.iterators.iterator]</a> as indicated:</p> |
| 44079 | + |
| 44080 | +<blockquote> |
| 44081 | +<pre> |
| 44082 | +[…] |
| 44083 | +template<<del>indirectly_readable</del><ins><i>weakly-indirectly-readable</i></ins> I> |
| 44084 | + using <i>iter-const-rvalue-reference-t</i> = <i>// exposition only</i> |
| 44085 | + common_reference_t<const iter_value_t<I>&&, iter_rvalue_reference_t<I>>; |
| 44086 | +[…] |
| 44087 | +</pre> |
| 44088 | +</blockquote> |
| 44089 | +</li> |
| 44090 | + |
| 44091 | +</ol> |
43975 | 44092 |
|
43976 | 44093 |
|
43977 | 44094 |
|
|
0 commit comments