aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/charconv
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/std/charconv')
-rw-r--r--libstdc++-v3/include/std/charconv61
1 files changed, 61 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
index e9bf953..09163af 100644
--- a/libstdc++-v3/include/std/charconv
+++ b/libstdc++-v3/include/std/charconv
@@ -736,6 +736,27 @@ namespace __detail
__value = __val;
return __res;
}
+#elif defined(__STDCPP_FLOAT128_T__) && defined(_GLIBCXX_HAVE_FLOAT128_MATH)
+#ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+ __extension__ from_chars_result
+ from_chars(const char* __first, const char* __last, __ieee128& __value,
+ chars_format __fmt = chars_format::general) noexcept;
+
+ inline from_chars_result
+ from_chars(const char* __first, const char* __last, _Float128& __value,
+ chars_format __fmt = chars_format::general) noexcept
+ {
+ __extension__ __ieee128 __val;
+ from_chars_result __res = from_chars(__first, __last, __val, __fmt);
+ if (__res.ec == errc{})
+ __value = __val;
+ return __res;
+ }
+#else
+ from_chars_result
+ from_chars(const char* __first, const char* __last, _Float128& __value,
+ chars_format __fmt = chars_format::general) noexcept;
+#endif
#endif
#if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) \
@@ -851,6 +872,46 @@ namespace __detail
return to_chars(__first, __last, static_cast<long double>(__value), __fmt,
__precision);
}
+#elif defined(__STDCPP_FLOAT128_T__) && defined(_GLIBCXX_HAVE_FLOAT128_MATH)
+#ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT
+ __extension__ to_chars_result
+ to_chars(char* __first, char* __last, __float128 __value) noexcept;
+ __extension__ to_chars_result
+ to_chars(char* __first, char* __last, __float128 __value,
+ chars_format __fmt) noexcept;
+ __extension__ to_chars_result
+ to_chars(char* __first, char* __last, __float128 __value,
+ chars_format __fmt, int __precision) noexcept;
+
+ inline to_chars_result
+ to_chars(char* __first, char* __last, _Float128 __value) noexcept
+ {
+ __extension__
+ return to_chars(__first, __last, static_cast<__float128>(__value));
+ }
+ inline to_chars_result
+ to_chars(char* __first, char* __last, _Float128 __value,
+ chars_format __fmt) noexcept
+ {
+ __extension__
+ return to_chars(__first, __last, static_cast<__float128>(__value), __fmt);
+ }
+ inline to_chars_result
+ to_chars(char* __first, char* __last, _Float128 __value,
+ chars_format __fmt, int __precision) noexcept
+ {
+ __extension__
+ return to_chars(__first, __last, static_cast<__float128>(__value), __fmt,
+ __precision);
+ }
+#else
+ to_chars_result to_chars(char* __first, char* __last, _Float128 __value)
+ noexcept;
+ to_chars_result to_chars(char* __first, char* __last, _Float128 __value,
+ chars_format __fmt) noexcept;
+ to_chars_result to_chars(char* __first, char* __last, _Float128 __value,
+ chars_format __fmt, int __precision) noexcept;
+#endif
#endif
#if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32)