Boost logo

Boost :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2006-04-10 17:43:55

Aristid Breitkreuz wrote:
> Another nice feature would be to check if the output was actually
> generated from the complete input. Imagine the following scenario: You
> have
> lexical_cast<double>("1,2")
> and as it happens, it returns 1 but happily.
> ...
> So I would call:
> lexical_cast<double>("1,2", ignore_tail = false)
> and get a exception. I will probably have to wait for Boost 1.36
> though :D.

I have a feeling you are using an old lexical_cast. AFAIK, The
lexical_cast in the newest Boost version assumes successful parsing only
if all of the input string was consumed.

Boost list run by bdawes at, gregod at, cpdaniel at, john at