File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 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
2626even required not to do this, P2609R3 can bring unexpected impacts. It seems that
2727constraints around `iter_value_t` should be avoided for such an algorithm.
2828</p >
29+
30+ <note >2025-10-23; Reflector poll; Status changed: New → 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< std::string> v;
41+ // the following not working, constraints not satisfied
42+ std::ranges::for_each(
43+ v | std::views::as_rvalue,
44+ [](std::string&& s) { }
45+ );
46+ </pre ></blockquote >
47+
2948</discussion >
3049
3150<resolution >
You can’t perform that action at this time.
0 commit comments