Boost logo

Boost :

Subject: Re: [boost] lexical_cast optimization
From: Othman, Ossama (ossama.othman_at_[hidden])
Date: 2008-12-03 14:11:11


>Please do not proceed at the expense of error handling. I believe using
>and ftoa is fine, but using atoi and atof is definitely not:
> cout << atoi("123X") prints 123
> cout << atoi("X") prints 0
>lexical_cast<int> throws in both cases, which I think is 100% the correct

Would strtol() and friends be suitable from a performance point of view? They at least provide some error reporting.


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