diff options
Diffstat (limited to 'libstdc++-v3/include/ext/vstring.h')
-rw-r--r-- | libstdc++-v3/include/ext/vstring.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 68acd576528..8732bd38891 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -2680,7 +2680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) +#if __cplusplus >= 201103L #include <ext/string_conversions.h> @@ -2688,6 +2688,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#if _GLIBCXX_USE_C99_STDLIB // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10) @@ -2726,7 +2727,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline long double stold(const __vstring& __str, std::size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } +#endif // _GLIBCXX_USE_C99_STDLIB +#if _GLIBCXX_USE_C99_STDIO // NB: (v)snprintf vs sprintf. // DR 1261. @@ -2789,8 +2792,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n, "%Lf", __val); } +#endif // _GLIBCXX_USE_C99_STDIO -#ifdef _GLIBCXX_USE_WCHAR_T +#if defined(_GLIBCXX_USE_WCHAR_T) && defined(_GLIBCXX_USE_C99_WCHAR) inline int stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), @@ -2890,8 +2894,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n, L"%Lf", __val); } -#endif -#endif +#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF +#endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR _GLIBCXX_END_NAMESPACE_VERSION } // namespace |