Boost logo

Boost Users :

Subject: Re: [Boost-users] [Lexical Cast] Strange behaviour
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-03-18 16:12:43


On Wed, Mar 18, 2009 at 4:16 PM, Alexander Nasonov <alnsn_at_[hidden]> wrote:

> Hi Robert,
> My MSVC ionstallation is broken. Can you please build the following
> program,
> pass -1 to it and check the exit code?
>
> #include <iostream>
> int main() { unsigned int i; std::cin >> i; return std::cin.good() ? 0 : 1;
> }
>
>
Ah, good plan, I'll do it tm when I have the compiler available.

Ultimately I believe the behaviour occurs because strtoul() returns the
global errno, and it's not checked by the streaming lib, so it will
be interesting to see the stream state.

Cheers, Rob.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net