
10 Apr
2006
10 Apr
'06
9:43 p.m.
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.