Title
generator::iterator should provide iterator_concept
Status
ready
Section
[coro.generator.iterator]
Submitter
Hewill Kang

Created on 2024-07-07.00:00:00 last changed 2 weeks ago

Messages

Date: 2026-07-10.16:16:57

Proposed resolution:

This wording is relative to N4981.

  1. Modify [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;
        […]
      };
    }
    
Date: 2026-07-15.00:00:00

[ 2026-07-10; LWG telecon. Change status New → Ready. ]

This is not intended to establish a policy that `iterator_concept` must be present to model the iterator concepts, we're just adding it in one place in a standard library type.

Date: 2024-08-15.00:00:00

[ 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.

Date: 2024-07-07.00:00:00

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.

History
Date User Action Args
2026-07-10 16:16:57adminsetmessages: + msg16505
2026-07-10 16:16:57adminsetstatus: new -> ready
2024-08-02 21:14:44adminsetmessages: + msg14282
2024-07-07 17:46:16adminsetmessages: + msg14235
2024-07-07 00:00:00admincreate