How do I select a version of libstdc+ to link against?

David Aldrich David.Aldrich@EMEA.NEC.COM
Thu Sep 22 13:49:00 GMT 2011


> If the stream only contains valid booleans, the loop will terminate after
> reaching EOF and trying to extract another boolean, which will set both eofbit
> and failbit.
> 
> The !iss.eof() test isn't quite right though, it will print "fail" for "true true x"
> but it will cause an incomplete value at the end of the stream to be silently
> discarded. So I was wrong to say it will print "fail" for "true true fal", that will
> silently ignore the partial "fal".
> 
> But while(iss>>boolalpha>>b) does give more consistent behaviour between
> 4.1 and 4.4

Thanks Jonathan, I'm happy now.

David



More information about the Libstdc++ mailing list