[Bug libstdc++/94674] std::ranges::basic_istream_view::iterator is missing std::iterator_traits entries
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 20 19:39:45 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94674
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The current disposition of the Library Working Group is to leave it that way,
because it doesn't meet the traditional iterator requirements, so it's expected
that iterator_traits is empty for it.
As you already know, you can use range_value_t<decltype(view)> to get the value
type instead, and range_difference_t for the difference type, and use the
concepts std::input_iterator, std::forward_iterator etc. to determine which
concepts it satisfies. Code written to work with ranges should rely on those
interfaces, not iterator_traits, which is for traditional iterator types.
More information about the Gcc-bugs
mailing list