|
79 | 79 | </tr> |
80 | 80 | </table> |
81 | 81 | <h1>C++ Standard Library Active Issues List (Revision D125)</h1> |
82 | | -<p>Revised 2025-04-27 at 16:10:19 UTC |
| 82 | +<p>Revised 2025-04-27 at 16:28:29 UTC |
83 | 83 | </p> |
84 | 84 | <p>Reference ISO/IEC IS 14882:2020(E)</p> |
85 | 85 | <p>Also see:</p> |
@@ -45734,7 +45734,7 @@ <h3 id="3854"><a href="#3854">3854</a><sup><a href="https://cplusplus.github.io/ |
45734 | 45734 | <hr> |
45735 | 45735 | <h3 id="3855"><a href="#3855">3855</a><sup><a href="https://cplusplus.github.io/LWG/issue3855">(i)</a></sup>. <code><i>tiny-range</i></code> is not quite right</h3> |
45736 | 45736 | <p><b>Section:</b> 25.7.16.2 <a href="https://wg21.link/range.lazy.split.view">[range.lazy.split.view]</a> <b>Status:</b> <a href="lwg-active.html#New">New</a> |
45737 | | - <b>Submitter:</b> Hewill Kang <b>Opened:</b> 2023-01-07 <b>Last modified:</b> 2023-02-01</p> |
| 45737 | + <b>Submitter:</b> Hewill Kang <b>Opened:</b> 2023-01-07 <b>Last modified:</b> 2025-04-27</p> |
45738 | 45738 | <p><b>Priority: </b>4 |
45739 | 45739 | </p> |
45740 | 45740 | <p><b>View other</b> <a href="lwg-index-open.html#range.lazy.split.view">active issues</a> in [range.lazy.split.view].</p> |
@@ -45764,9 +45764,9 @@ <h3 id="3855"><a href="#3855">3855</a><sup><a href="https://cplusplus.github.io/ |
45764 | 45764 | Maybe use <code>requires bool_constant<ranges::size(r) <= 1></code>. |
45765 | 45765 | </p> |
45766 | 45766 |
|
| 45767 | +<p><strong>Previous resolution [SUPERSEDED]:</strong></p> |
| 45768 | +<blockquote class="note"> |
45767 | 45769 |
|
45768 | | - |
45769 | | -<p id="res-3855"><b>Proposed resolution:</b></p> |
45770 | 45770 | <p> |
45771 | 45771 | This wording is relative to <a href="https://wg21.link/N4917" title=" Working Draft, Standard for Programming Language C++">N4917</a>. |
45772 | 45772 | </p> |
@@ -45822,6 +45822,95 @@ <h3 id="3855"><a href="#3855">3855</a><sup><a href="https://cplusplus.github.io/ |
45822 | 45822 | </li> |
45823 | 45823 |
|
45824 | 45824 | </ol> |
| 45825 | +</blockquote> |
| 45826 | + |
| 45827 | +<p><i>[2025-04-27, Hewill provides alternative wording]</i></p> |
| 45828 | + |
| 45829 | + |
| 45830 | + |
| 45831 | +<p id="res-3855"><b>Proposed resolution:</b></p> |
| 45832 | +<p> |
| 45833 | +This wording is relative to <a href="https://wg21.link/N5008">N5008</a>. |
| 45834 | +</p> |
| 45835 | + |
| 45836 | +<ol> |
| 45837 | +<li><p>Modify 25.7.16.2 <a href="https://wg21.link/range.lazy.split.view">[range.lazy.split.view]</a> as indicated:</p> |
| 45838 | + |
| 45839 | +<blockquote class="note"> |
| 45840 | +<p> |
| 45841 | +[<i>Drafting note:</i> This benefits from <a href="https://wg21.link/P2280" title=" Using unknown references in constant expressions">P2280</a> that a call to a |
| 45842 | +member function of a non-constexpr object can be a constant expression if it does |
| 45843 | +not actually access the member. |
| 45844 | +<p/> |
| 45845 | +This would make <code>views::lazy_split(r, span<int, 0>{})</code> |
| 45846 | +well-formed, which can be seen as an enhancement.] |
| 45847 | +</p> |
| 45848 | +</blockquote> |
| 45849 | + |
| 45850 | +<blockquote> |
| 45851 | +<pre> |
| 45852 | +namespace std::ranges { |
| 45853 | + <del>template<auto> struct <i>require-constant</i>; // <i>exposition only</i></del> |
| 45854 | + |
| 45855 | + template<class R> |
| 45856 | + concept <i>tiny-range</i> = // <i>exposition only</i> |
| 45857 | + sized_range<R> && |
| 45858 | + <ins>requires (R& r) { requires bool_constant<ranges::size(r) <= 1>::value; }</ins> |
| 45859 | + <del>requires { typename <i>require-constant</i><remove_reference_t<R>::size()>; } && |
| 45860 | + (remove_reference_t<R>::size() <= 1)</del>; |
| 45861 | + |
| 45862 | + template<input_range V, forward_range Pattern> |
| 45863 | + requires view<V> && view<Pattern> && |
| 45864 | + indirectly_comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> && |
| 45865 | + (forward_range<V> || <i>tiny-range</i><Pattern>) |
| 45866 | + class lazy_split_view::view_interface<lazy_split_view<V, Pattern>> { |
| 45867 | + […] |
| 45868 | + }; |
| 45869 | + […] |
| 45870 | +} |
| 45871 | +</pre> |
| 45872 | +</blockquote> |
| 45873 | +</li> |
| 45874 | + |
| 45875 | +<li><p>Modify 25.7.16.5 <a href="https://wg21.link/range.lazy.split.inner">[range.lazy.split.inner]</a> as indicated:</p> |
| 45876 | + |
| 45877 | +<blockquote class="note"> |
| 45878 | +<p> |
| 45879 | +[<i>Drafting note:</i> |
| 45880 | +We can't use <code>if constexpr (ranges::size(<i>i_</i>.<i>parent_</i>-><i>pattern_</i>) == 0)</code> |
| 45881 | +here because it is not a constant expression, and it seems more intuitive to just use |
| 45882 | +<code>ranges::empty</code> which is always well-formed. Note that the PR does not seek the |
| 45883 | +aggressive optimization that minimizes the instantiation as this is not the intent of the |
| 45884 | +current design (for example, <code><i>outer-iterator</i>& operator++()</code> can be |
| 45885 | +specialized for the case where <code>Pattern::size() == 0</code>), library implementations |
| 45886 | +are free to optimize as it pleases.] |
| 45887 | +</p> |
| 45888 | +</blockquote> |
| 45889 | + |
| 45890 | +<blockquote> |
| 45891 | +<pre> |
| 45892 | +constexpr <i>inner-iterator</i>& operator++(); |
| 45893 | +</pre> |
| 45894 | +<blockquote> |
| 45895 | +<p> |
| 45896 | +-5- <i>Effects:</i> Equivalent to: |
| 45897 | +</p> |
| 45898 | +<blockquote><pre> |
| 45899 | +<i>incremented_</i> = true; |
| 45900 | +if constexpr (!forward_range<<i>Base</i>>) { |
| 45901 | + <ins>if (ranges::empty(<i>i_</i>.<i>parent_</i>-><i>pattern_</i>))</ins> |
| 45902 | + <del>if constexpr (Pattern::size() == 0) {</del> |
| 45903 | + return *this; |
| 45904 | + } |
| 45905 | +} |
| 45906 | +++<i>i_</i>.<i>current</i>; |
| 45907 | +return *this; |
| 45908 | +</pre></blockquote> |
| 45909 | +</blockquote> |
| 45910 | +</blockquote> |
| 45911 | +</li> |
| 45912 | + |
| 45913 | +</ol> |
45825 | 45914 |
|
45826 | 45915 |
|
45827 | 45916 |
|
|
0 commit comments