29 #ifndef _STRING_CONVERSIONS_H
30 #define _STRING_CONVERSIONS_H 1
32 #pragma GCC system_header
42 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
44 _GLIBCXX_BEGIN_NAMESPACE_VERSION
47 template<
typename _TRet,
typename _Ret = _TRet,
typename _CharT,
50 __stoa(_TRet (*__convf) (
const _CharT*, _CharT**, _Base...),
51 const char* __name,
const _CharT* __str, std::size_t* __idx,
58 const _TRet __tmp = __convf(__str, &__endptr,
__base...);
60 if (__endptr == __str)
61 std::__throw_invalid_argument(__name);
62 else if (errno == ERANGE
63 || (std::__are_same<_Ret, int>::__value
64 && (__tmp < __numeric_traits<int>::__min
65 || __tmp > __numeric_traits<int>::__max)))
66 std::__throw_out_of_range(__name);
71 *__idx = __endptr - __str;
77 template<
typename _String,
typename _CharT =
typename _String::value_type>
79 __to_xstring(
int (*__convf) (_CharT*, std::size_t,
const _CharT*,
80 __builtin_va_list), std::size_t __n,
81 const _CharT* __fmt, ...)
85 _CharT* __s =
static_cast<_CharT*
>(__builtin_alloca(
sizeof(_CharT)
88 __builtin_va_list __args;
89 __builtin_va_start(__args, __fmt);
91 const int __len = __convf(__s, __n, __fmt, __args);
93 __builtin_va_end(__args);
95 return _String(__s, __s + __len);
98 _GLIBCXX_END_NAMESPACE_VERSION
101 #endif // _STRING_CONVERSIONS_H
_Siter_base< _Iterator >::iterator_type __base(_Iterator __it)