Skip to content

Commit 1d0a394

Browse files
committed
Set 4241 to LEWG/P3
1 parent d58326b commit 1d0a394

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

xml/issue4241.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version='1.0' encoding='utf-8' standalone='no'?>
22
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
33

4-
<issue num="4241" status="New">
4+
<issue num="4241" status="LEWG">
55
<title>`ranges::for_each(_n)` should be less constrained</title>
66
<section>
77
<sref ref="[alg.foreach]"/>
88
</section>
99
<submitter>Jiang An</submitter>
1010
<date>08 Apr 2025</date>
11-
<priority>99</priority>
11+
<priority>3</priority>
1212

1313
<discussion>
1414
<p>
@@ -26,6 +26,25 @@ algorithms potentially use the intermediate element values copied as
2626
even required not to do this, P2609R3 can bring unexpected impacts. It seems that
2727
constraints around `iter_value_t` should be avoided for such an algorithm.
2828
</p>
29+
30+
<note>2025-10-23; Reflector poll; Status changed: New &rarr; LEWG and P3.</note>
31+
<p>
32+
This is design change.
33+
More algorithms (like `count_if`, `any_of`, etc.) that never produce
34+
`iter_value_t` are affected.
35+
<p>
36+
</p>
37+
Example of affected code:
38+
</p>
39+
<blockquote><pre>
40+
std::vector&lt;std::string&gt; v;
41+
// the following not working, constraints not satisfied
42+
std::ranges::for_each(
43+
v | std::views::as_rvalue,
44+
[](std::string&amp;&amp; s) { }
45+
);
46+
</pre></blockquote>
47+
2948
</discussion>
3049

3150
<resolution>

0 commit comments

Comments
 (0)