@@ -1258,30 +1258,46 @@ fastfloat_really_inline constexpr uint64_t min_safe_u64(int base) {
1258
1258
1259
1259
static_assert (std::is_same<equiv_uint_t <double >, uint64_t >::value,
1260
1260
" equiv_uint should be uint64_t for double" );
1261
+ static_assert (std::numeric_limits<double >::is_iec559,
1262
+ " double must fulfill the requirements of IEC 559 (IEEE 754)" );
1261
1263
1262
1264
static_assert (std::is_same<equiv_uint_t <float >, uint32_t >::value,
1263
1265
" equiv_uint should be uint32_t for float" );
1266
+ static_assert (std::numeric_limits<float >::is_iec559,
1267
+ " float must fulfill the requirements of IEC 559 (IEEE 754)" );
1264
1268
1265
1269
#ifdef __STDCPP_FLOAT64_T__
1266
1270
static_assert (std::is_same<equiv_uint_t <std::float64_t >, uint64_t >::value,
1267
1271
" equiv_uint should be uint64_t for std::float64_t" );
1272
+ static_assert (
1273
+ std::numeric_limits<std::float64_t >::is_iec559,
1274
+ " std::float64_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1268
1275
#endif
1269
1276
1270
1277
#ifdef __STDCPP_FLOAT32_T__
1271
1278
static_assert (std::is_same<equiv_uint_t <std::float32_t >, uint32_t >::value,
1272
1279
" equiv_uint should be uint32_t for std::float32_t" );
1280
+ static_assert (
1281
+ std::numeric_limits<std::float32_t >::is_iec559,
1282
+ " std::float32_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1273
1283
#endif
1274
1284
1275
1285
#ifdef __STDCPP_FLOAT16_T__
1276
1286
static_assert (
1277
1287
std::is_same<binary_format<std::float16_t >::equiv_uint, uint16_t >::value,
1278
1288
" equiv_uint should be uint16_t for std::float16_t" );
1289
+ static_assert (
1290
+ std::numeric_limits<std::float16_t >::is_iec559,
1291
+ " std::float16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1279
1292
#endif
1280
1293
1281
1294
#ifdef __STDCPP_BFLOAT16_T__
1282
1295
static_assert (
1283
1296
std::is_same<binary_format<std::bfloat16_t >::equiv_uint, uint16_t >::value,
1284
1297
" equiv_uint should be uint16_t for std::bfloat16_t" );
1298
+ static_assert (
1299
+ std::numeric_limits<std::bfloat16_t >::is_iec559,
1300
+ " std::bfloat16_t must fulfill the requirements of IEC 559 (IEEE 754)" );
1285
1301
#endif
1286
1302
1287
1303
constexpr chars_format operator ~(chars_format rhs) noexcept {
0 commit comments