Menu

to_string

Anonymous

Q:
I get some errors with C++11 to_string when building/using GCC, what gives?

A:
GCC 4.8.x and later supports std::to_string and requires at least r5437 from the Mingw-w64 trunk SVN to support std::to_string. The main change in r5437 is that swprintf is now ISO complaint rather than MS specific. This is the same behavior exhibited by recent Visual Studio releases.

To use the old behavior, use _CRT_NON_CONFORMING_SWPRINTFS or _swprintf instead. Note that setting _CRT_NON_CONFORMING_SWPRINTFS when in C++11 mode will lead to undefined behavior.


Related

Wiki2: FAQ

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.