5
5
#include < cstdint>
6
6
#include < cassert>
7
7
#include < cstring>
8
+ #include < limits>
8
9
#include < type_traits>
9
10
#include < system_error>
10
11
#ifdef __has_include
@@ -222,13 +223,13 @@ fastfloat_really_inline constexpr bool cpp20_and_in_constexpr() {
222
223
template <typename T>
223
224
struct is_supported_float_type
224
225
: 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
229
227
#ifdef __STDCPP_FLOAT64_T__
230
228
|| std::is_same<T, std::float64_t >::value
231
229
#endif
230
+ #ifdef __STDCPP_FLOAT32_T__
231
+ || std::is_same<T, std::float32_t >::value
232
+ #endif
232
233
#ifdef __STDCPP_FLOAT16_T__
233
234
|| std::is_same<T, std::float16_t >::value
234
235
#endif
@@ -757,8 +758,7 @@ template <>
757
758
inline constexpr size_t binary_format<std::float16_t >::max_digits() {
758
759
return 22 ;
759
760
}
760
-
761
- #endif
761
+ #endif // __STDCPP_FLOAT16_T__
762
762
763
763
// credit: Jakub Jelínek
764
764
#ifdef __STDCPP_BFLOAT16_T__
@@ -881,8 +881,7 @@ template <>
881
881
inline constexpr size_t binary_format<std::bfloat16_t >::max_digits() {
882
882
return 98 ;
883
883
}
884
-
885
- #endif
884
+ #endif // __STDCPP_BFLOAT16_T__
886
885
887
886
template <>
888
887
inline constexpr uint64_t
@@ -1051,7 +1050,6 @@ template <> constexpr char32_t const *str_const_nan<char32_t>() {
1051
1050
template <> constexpr char8_t const *str_const_nan<char8_t >() {
1052
1051
return u8" nan" ;
1053
1052
}
1054
-
1055
1053
#endif
1056
1054
1057
1055
template <typename UC> constexpr UC const *str_const_inf ();
@@ -1074,7 +1072,6 @@ template <> constexpr char32_t const *str_const_inf<char32_t>() {
1074
1072
template <> constexpr char8_t const *str_const_inf<char8_t >() {
1075
1073
return u8" infinity" ;
1076
1074
}
1077
-
1078
1075
#endif
1079
1076
1080
1077
template <typename = void > struct int_luts {
@@ -1158,15 +1155,15 @@ static_assert(std::is_same<equiv_uint_t<std::float64_t>, uint64_t>::value,
1158
1155
static_assert (
1159
1156
std::numeric_limits<std::float64_t >::is_iec559,
1160
1157
" std::float64_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1161
- #endif
1158
+ #endif // __STDCPP_FLOAT64_T__
1162
1159
1163
1160
#ifdef __STDCPP_FLOAT32_T__
1164
1161
static_assert (std::is_same<equiv_uint_t <std::float32_t >, uint32_t >::value,
1165
1162
" equiv_uint should be uint32_t for std::float32_t" );
1166
1163
static_assert (
1167
1164
std::numeric_limits<std::float32_t >::is_iec559,
1168
1165
" std::float32_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1169
- #endif
1166
+ #endif // __STDCPP_FLOAT32_T__
1170
1167
1171
1168
#ifdef __STDCPP_FLOAT16_T__
1172
1169
static_assert (
@@ -1175,7 +1172,7 @@ static_assert(
1175
1172
static_assert (
1176
1173
std::numeric_limits<std::float16_t >::is_iec559,
1177
1174
" std::float16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1178
- #endif
1175
+ #endif // __STDCPP_FLOAT16_T__
1179
1176
1180
1177
#ifdef __STDCPP_BFLOAT16_T__
1181
1178
static_assert (
@@ -1184,7 +1181,7 @@ static_assert(
1184
1181
static_assert (
1185
1182
std::numeric_limits<std::bfloat16_t >::is_iec559,
1186
1183
" std::bfloat16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1187
- #endif
1184
+ #endif // __STDCPP_BFLOAT16_T__
1188
1185
1189
1186
constexpr chars_format operator ~(chars_format rhs) noexcept {
1190
1187
using int_type = std::underlying_type<chars_format>::type;
0 commit comments