http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46906

--- Comment #11 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-05 
15:05:56 UTC ---
(In reply to comment #10)
> > When I read that operator* returns sgetc(), I understand that as 
> > assert(*i==buf.sgetc()).
> But as explained below this requires that no further external source modifies
> the stream (buffer) at the same time. It is unspecified whether an
> implementation caches the read value or not.

I am sorry but I still can't see what allows the implementation to cache the
value in the presence of external changes to the streambuf.

> The "(void)*a, *a" requirements ensures that you can invoke operator* several
> times without a value change of the result. This holds for both 
> implementations
> if no external changes happen to the stream buffer.

But here there is an external change, so it doesn't apply.

> You could request an LWG issue for this to clarify the intent

Nah, since it looks clear to you that both behaviors are valid, unless someone
else complains, I'll leave it alone (and I guess I'll close the bug as
invalid).

Reply via email to