fix throw with exceptions disabled (#2647)

This commit is contained in:
Alexey Ochapov 2021-12-18 00:44:36 +03:00 committed by GitHub
parent 35f60377aa
commit 82246b8766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -707,7 +707,7 @@ FMT_INLINE FMT_CONSTEXPR20 digits::result grisu_gen_digits(
int precision_offset = exp + handler.exp10;
if (precision_offset > 0 &&
handler.precision > max_value<int>() - precision_offset) {
throw format_error("number is too big");
FMT_THROW(format_error("number is too big"));
}
handler.precision += precision_offset;
// Check if precision is satisfied just by leading zeros, e.g.