Title
ranges::basic_istream_view::iterator should not provide iterator_category
Status
c++20
Section
[range.istream.iterator]
Submitter
Tomasz Kamiński

Created on 2020-02-13.00:00:00 last changed 46 months ago

Messages

Date: 2020-02-14.09:37:04

Proposed resolution:

This wording is relative to N4849.

  1. Modify [range.istream.iterator] as indicated:

    namespace std::ranges {
      template<class Val, class CharT, class Traits>
      class basic_istream_view<Val, CharT, Traits>::iterator { // exposition only
      public:
        using iterator_categoryiterator_concept = input_iterator_tag;
        using difference_type = ptrdiff_t;
        using value_type = Val;
    
        iterator() = default;
        […]
      };
    }
    

Date: 2020-02-14.09:37:04

[ 2020-02 Status to Immediate on Thursday night in Prague. ]

Date: 2020-02-13.00:00:00

The ranges::basic_istream_view::iterator is a move-only type, and as such it does not meets the Cpp17 iterator requirements, yet it does provides iterator_category (intended to be used for Cpp17 iterators). We should provide iterator_concept instead.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2020-02-24 16:02:59adminsetstatus: immediate -> wp
2020-02-14 09:37:04adminsetmessages: + msg11109
2020-02-14 09:37:04adminsetstatus: new -> immediate
2020-02-13 15:06:58adminsetmessages: + msg11068
2020-02-13 00:00:00admincreate