[Bug libstdc++/93651] std::ranges::iota_view<long, long>::iterator is not a Cpp17 input iterator

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 10 13:49:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93651

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-02-10
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think this is a defect in the C++2a draft. The cpp17-iterator concept
requires the difference_type to be a signed integral type. To work with
iota_view's iterators I think it should permit signed integer-like types as
well (because iota_view's iterators use non-integral types to represent the
difference type when the view uses the largest integer type).


More information about the Gcc-bugs mailing list