|
Boost Users : |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-11-18 16:41:30
On Nov 18, 2005, at 4:00 PM, john.wismar_at_[hidden] wrote:
>
> We've noticed some changed behavior in a module that's using
> lexical_cast, having gone from 1.32.0 to 1.33.0. I tracked it down to
> this change:
> [snip
> It turns out that we are passing a string containing a number with a
> trailing space. The 1.32.0 version of lexical_cast did not mind the
> trailing space, but the 1.33.0 version throws a bad_lexical_cast
> exception. I found that if I change this:
> stream.get() ==
> to this:
> (stream >> std::ws).get() ==
>
> that my issue goes away, but the workaround for compilers without the
> eof() function still works.... Would it be possilbe to add this into
> 1.34.0, or is this undesirable behavior?
This looks like a reasonably change to me; I hope that someone more
involved in lexical_cast<> can give us more information, either
rationale for the 1.33.0 behavior or confirmation that this is a bug.
If it is a change that needs to be made, we'll put it in 1.33.1.
Doug
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