This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: another effc++ spurious warning?


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).
Instead, the only semantic constraints are that (void)i++ behave like
(void)++i, and that *i++ must be equivalent to what we expect from it (which I
can see implemented only through a non-reference return value).

As far as I can tell, istream_iterator and ostream_iterator are really a
special case. Maybe it makes sense to special case them in the warning. 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?

Giovanni Bajo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]