std::to_string fixed in Visual Studio 2012
Among many other fixes coming in the new version of Visual Studio, is a fix to std::to_string (introduced in Visual Studio 2010) providing the full range of numerical types. Currently using the function with any numerical type other than long long or long double or unsigned long long yields compiler error C2668 – ambiguous call to overloaded function.
Whilst annoying, there’s a trivial workaround for Visual Studio 2010 to still use this handy function without resorting to boost::lexical_cast by static_casting to one of the three currently provided overloads. As of VS 2012, such massaging of types is no longer required. 🙂