This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Input stream with
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Andre-Marcel Hellmund <hellmund at fzi dot de>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 20 Mar 2015 11:30:31 +0000
- Subject: Re: Input stream with
- Authentication-results: sourceware.org; auth=none
- References: <550B430F dot 6080808 at fzi dot de>
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."