This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: another effc++ spurious warning?
Giovanni Bajo:
> Gabriel Dos Reis wrote:
>
>> I don't believe that you need advanced fu-bhar-programming.
>> The concept of InputIterator and OutputIterator is a very
>> very basic concept, for which you have examples for
>> in the real life.
>
> I don't see anything in the standard which says that, for Input/Output
> iterators, operator++(int) should return a reference (possibly to this).
Good! Then, why do you insist that you should warn about what they
return, and expecially that [io]stream_iterator<> are
special cases then?
You said that only specially advanced programming do something
silly vs. -Weffc++; I'm saying you "No, because by the very
nature of Input/Output iterator", you can't go and
warn against them. If you do, then you're hurting any modern
C++ use. And modern C++ use need not be advanced.
> As far as I can tell, istream_iterator and ostream_iterator are really a
> special case.
No, they are not. They're just standard examples of what
common truly input-output iterators may behave. And they
do so consistently.
> Maybe it makes sense to special case them in the warning.
That would be a real mistake and disaster. Of course,
-Weffc++ is already a disaster.
> I'm
> going to try to implement this approacch.
>
>> I strongly feel about these warnings against abstraction
>
> Why don't you try to describe it in detail and file a PR against it?
file a PR against what?