Backport from mainline
2014-12-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/37522
* include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll,
stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF
to guard definition of to_wstring.
From-SVN: r223840
+2015-05-28 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2014-12-22 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/37522
+ * include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll,
+ stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF
+ to guard definition of to_wstring.
+
2015-05-22 David Edelsohn <dje.gcc@gmail.com>
Backport from mainline
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
- && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
#include <ext/string_conversions.h>
stold(const wstring& __str, size_t* __idx = 0)
{ return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
+#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
// DR 1261.
inline wstring
to_wstring(int __val)
return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
L"%Lf", __val);
}
+#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
#endif
_GLIBCXX_END_NAMESPACE_VERSION