Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions xml/issue3855.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ namespace std::ranges {
[<i>Drafting note:</i>
We can't use <code>if constexpr (ranges::size(<i>i_</i>.<i>parent_</i>-&gt;<i>pattern_</i>) == 0)</code>
here because it is not a constant expression, and it seems more intuitive to just use
<code>ranges::empty</code> which is always well-formed. Note that the PR does not seek the
aggressive optimization that minimizes the instantiation as this is not the intent of the
current design (for example, <code><i>outer-iterator</i>&amp; operator++()</code> can be
specialized for the case where <code>Pattern::size() == 0</code>), library implementations
are free to optimize as it pleases.]
<code>ranges::empty</code> combined with runtime <code>if</code> which is always well-formed.
Note that the PR does not seek the aggressive optimization that minimizes the instantiation as this is
not the intent of the current design (for example, <code><i>outer-iterator</i>&amp; operator++()</code>
can be specialized for the case where <code>Pattern::size() == 0</code> to save some O(1) comparisons),
library implementations are free to optimize as it pleases.]
</p>
</blockquote>

Expand Down