Input stream with

Jonathan Wakely jwakely.gcc@gmail.com
Fri Mar 20 11:30:00 GMT 2015


On 19 March 2015 at 21:43, Andre-Marcel Hellmund wrote:
> The output of the program is: 7fffffff - 1
>
> In the first instance, I was somehow expecting the value of 'val' to be -1,
> so I was wondering which part of the C++ standard defines those conversion
> rules and hence explains why my expectation was totally wrong. Could someone
> please give me a hint?

[facet.num.get.virtuals] says the value stored in val is
"the most positive representable value, if the field represents a
value too large positive to be
represented in val. ios_base::failbit is assigned to err."



More information about the Gcc-help mailing list