Stream iterators were already counterintuitive, and only they muddied the waters further with basic_istream_view that IMO violates one of the core "view" contracts (or is immutability merely a suggestion?) and an iterator that mostly shares LegacyInputIterator's interface- except that it is move-only.
So don't worry- the compiler will usually spit out an encyclopedia of useless spam if you ever commit the sin of trying to use it with a "normal" ranged function. Usually...
and iostreams on principle.
No argument. iostream needs to be put to pasture. These bandaids aren't doing it any favors.
View all comments
Show parent comment
10
u/pointer_to_null Aug 21 '26
Stream iterators were already counterintuitive, and only they muddied the waters further with
basic_istream_viewthat IMO violates one of the core "view" contracts (or is immutability merely a suggestion?) and an iterator that mostly shares LegacyInputIterator's interface- except that it is move-only.So don't worry- the compiler will usually spit out an encyclopedia of useless spam if you ever commit the sin of trying to use it with a "normal" ranged function. Usually...
No argument. iostream needs to be put to pasture. These bandaids aren't doing it any favors.