https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145

--- Comment #18 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Boris Kolpackov from comment #17)
> > if (is >> x >> y >> z)
> 
> And what should happen in the else part of such statements?
> 
> if (is >> x >> y >> z)
>   ...
> else
>   throw something();

Whatever is appropriate for the program.

> Also note that if the 'is >> x' call in the above chain fails, you will
> still execute 'is >> y' and 'is >> z' before noticing the failure.

But they don't do anything if the stream state isn't good, they just return.

I'm not suggesting anything radical or novel, just the standard way to use
iostreams.

Reply via email to