55#include < cstdint>
66#include < cassert>
77#include < cstring>
8+ #include < limits>
89#include < type_traits>
910#include < system_error>
1011#ifdef __has_include
@@ -222,13 +223,13 @@ fastfloat_really_inline constexpr bool cpp20_and_in_constexpr() {
222223template <typename T>
223224struct is_supported_float_type
224225 : std::integral_constant<
225- bool , std::is_same<T, float >::value || std::is_same<T, double >::value
226- #ifdef __STDCPP_FLOAT32_T__
227- || std::is_same<T, std::float32_t >::value
228- #endif
226+ bool , std::is_same<T, double >::value || std::is_same<T, float >::value
229227#ifdef __STDCPP_FLOAT64_T__
230228 || std::is_same<T, std::float64_t >::value
231229#endif
230+ #ifdef __STDCPP_FLOAT32_T__
231+ || std::is_same<T, std::float32_t >::value
232+ #endif
232233#ifdef __STDCPP_FLOAT16_T__
233234 || std::is_same<T, std::float16_t >::value
234235#endif
@@ -757,8 +758,7 @@ template <>
757758inline constexpr size_t binary_format<std::float16_t >::max_digits() {
758759 return 22 ;
759760}
760-
761- #endif
761+ #endif // __STDCPP_FLOAT16_T__
762762
763763// credit: Jakub Jelínek
764764#ifdef __STDCPP_BFLOAT16_T__
@@ -881,8 +881,7 @@ template <>
881881inline constexpr size_t binary_format<std::bfloat16_t >::max_digits() {
882882 return 98 ;
883883}
884-
885- #endif
884+ #endif // __STDCPP_BFLOAT16_T__
886885
887886template <>
888887inline constexpr uint64_t
@@ -1051,7 +1050,6 @@ template <> constexpr char32_t const *str_const_nan<char32_t>() {
10511050template <> constexpr char8_t const *str_const_nan<char8_t >() {
10521051 return u8" nan" ;
10531052}
1054-
10551053#endif
10561054
10571055template <typename UC> constexpr UC const *str_const_inf ();
@@ -1074,7 +1072,6 @@ template <> constexpr char32_t const *str_const_inf<char32_t>() {
10741072template <> constexpr char8_t const *str_const_inf<char8_t >() {
10751073 return u8" infinity" ;
10761074}
1077-
10781075#endif
10791076
10801077template <typename = void > struct int_luts {
@@ -1158,15 +1155,15 @@ static_assert(std::is_same<equiv_uint_t<std::float64_t>, uint64_t>::value,
11581155static_assert (
11591156 std::numeric_limits<std::float64_t >::is_iec559,
11601157 " std::float64_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1161- #endif
1158+ #endif // __STDCPP_FLOAT64_T__
11621159
11631160#ifdef __STDCPP_FLOAT32_T__
11641161static_assert (std::is_same<equiv_uint_t <std::float32_t >, uint32_t >::value,
11651162 " equiv_uint should be uint32_t for std::float32_t" );
11661163static_assert (
11671164 std::numeric_limits<std::float32_t >::is_iec559,
11681165 " std::float32_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1169- #endif
1166+ #endif // __STDCPP_FLOAT32_T__
11701167
11711168#ifdef __STDCPP_FLOAT16_T__
11721169static_assert (
@@ -1175,7 +1172,7 @@ static_assert(
11751172static_assert (
11761173 std::numeric_limits<std::float16_t >::is_iec559,
11771174 " std::float16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1178- #endif
1175+ #endif // __STDCPP_FLOAT16_T__
11791176
11801177#ifdef __STDCPP_BFLOAT16_T__
11811178static_assert (
@@ -1184,7 +1181,7 @@ static_assert(
11841181static_assert (
11851182 std::numeric_limits<std::bfloat16_t >::is_iec559,
11861183 " std::bfloat16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1187- #endif
1184+ #endif // __STDCPP_BFLOAT16_T__
11881185
11891186constexpr chars_format operator ~(chars_format rhs) noexcept {
11901187 using int_type = std::underlying_type<chars_format>::type;
0 commit comments