|
1 | 1 | <?xml version='1.0' encoding='utf-8' standalone='no'?> |
2 | 2 | <!DOCTYPE issue SYSTEM "lwg-issue.dtd"> |
3 | 3 |
|
4 | | -<issue num="4050" status="New"> |
| 4 | +<issue num="4050" status="Tentatively NAD"> |
5 | 5 | <title>Should <tt>views::iota(0) | views::take(5)</tt> be <tt>views::iota(0, 5)</tt>?</title> |
6 | 6 | <section><sref ref="[range.take.overview]"/><sref ref="[range.take.overview]"/></section> |
7 | 7 | <submitter>Hewill Kang</submitter> |
@@ -45,6 +45,24 @@ std::ranges::sized_range auto repeat = std::views::repeat(0) | take_and_drop; // |
45 | 45 | If we do account for the infinity of <tt>repeat_view</tt>, then I see no reason not to do it for <tt>iota_view</tt>, |
46 | 46 | as this is obviously intuitive and can indeed be considered an enhancement. |
47 | 47 | </p> |
| 48 | + |
| 49 | +<note>2025-10-20; Reflector poll; Status changed: New → Tentatively NAD.</note> |
| 50 | +<p> |
| 51 | +"This changes meaning of existing C++20 for unclear benefit. |
| 52 | +This would need a paper." |
| 53 | +</p> |
| 54 | +<p> |
| 55 | +"Why does `iota(0, 10) | take(5)` give you `iota(0, 5)` but `iota(0) | take(5)` doesn't?" |
| 56 | +</p> |
| 57 | +<p> |
| 58 | +"IIRC there was opposition to <paper num="P1739"/> introducing any kind of |
| 59 | +special cases in the adaptor objects. What got consensus was only the |
| 60 | +'specialisations' that preserve the exact type of the underlying range. |
| 61 | +Thus `iota(0, 10)` → `iota(0, 5)` was fine, but `iota(0)` → `iota(0, 5)` |
| 62 | +would not have been. |
| 63 | +I still think that all changes that simplify the return types are helpful, |
| 64 | +but it would certainly be a breaking change now." |
| 65 | +</p> |
48 | 66 | </discussion> |
49 | 67 |
|
50 | 68 | <resolution> |
|
0 commit comments