Is boost::lexical_cast redundant with c++11 stoi, stof and family?
boost, c++, c++11, std, stl
Solution
`boost::lexical_cast`
- handles more kinds of conversion, including iterator pairs, arrays, C strings, etc.
- offers the same generic interface (`sto*` have different names for different types)
- is locale-sensitive (`sto*`/`to_string` are only in part, e.g. `lexical_cast` can process thousands separators, while `stoul` usually doesn't)
Problem
Is `boost::lexical_cast` redundant now that C++11 introduces `stoi`, `stof` and family, or is there any reason to still use it? (apart from not having a C++11 compiler) Do they provide exactly the same functionality?