generator::iterator
should provide iterator_concept
Section: 25.8.6 [coro.generator.iterator] Status: New Submitter: Hewill Kang Opened: 2024-07-07 Last modified: 2024-08-02
Priority: 4
View other active issues in [coro.generator.iterator].
View all other issues in [coro.generator.iterator].
View all issues with New status.
Discussion:
generator::iterator
currently does not provide an iterator_concept
.
While this does not affect it being an input_iterator
, providing iterator_concept
does improve consistency given that other C++20 iterators have such a member type alias.
[2024-08-02; Reflector poll]
Set priority to 4 after reflector poll. Six votes for P0 (tentatively ready) but one NAD vote saying that if this has no effect on the category then there's no reason to add it.
Proposed resolution:
This wording is relative to N4981.
Modify 25.8.6 [coro.generator.iterator] as indicated:
namespace std { template<class Ref, class V, class Allocator> class generator<Ref, V, Allocator>::iterator { public: using iterator_concept = input_iterator_tag; using value_type = value; using difference_type = ptrdiff_t; […] }; }