Skip to content

Commit 0921e29

Browse files
committed
New issue from Hewill Kang: "generator::iterator should provide iterator_concept"
1 parent 1447f59 commit 0921e29

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

xml/issue4117.xml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4117" status="New">
5+
<title><tt>generator::<i>iterator</i></tt> should provide <tt>iterator_concept</tt></title>
6+
<section><sref ref="[coro.generator.iterator]"/></section>
7+
<submitter>Hewill Kang</submitter>
8+
<date>07 Jul 2024</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
<tt>generator::<i>iterator</i></tt> currently does not provide an <tt>iterator_concept</tt>.
14+
While this does not affect it being an <tt>input_iterator</tt>, providing <tt>iterator_concept</tt>
15+
does improve consistency given that other C++20 iterators have such a member type alias.
16+
</p>
17+
</discussion>
18+
19+
<resolution>
20+
<p>
21+
This wording is relative to <paper num="N4981"/>.
22+
</p>
23+
24+
<ol>
25+
<li><p>Modify <sref ref="[coro.generator.iterator]"/> as indicated:</p>
26+
27+
<blockquote><pre>
28+
namespace std {
29+
template&lt;class Ref, class V, class Allocator&gt;
30+
class generator&lt;Ref, V, Allocator&gt;::<i>iterator</i> {
31+
public:
32+
<ins>using iterator_concept = input_iterator_tag;</ins>
33+
using value_type = value;
34+
using difference_type = ptrdiff_t;
35+
[&hellip;]
36+
};
37+
}
38+
</pre></blockquote>
39+
40+
</li>
41+
42+
</ol>
43+
</resolution>
44+
45+
</issue>

0 commit comments

Comments
 (0)