mirror of
https://github.com/fmtlib/fmt.git
synced 2025-03-13 19:19:10 +00:00
Fix throw with exceptions disabled
This commit is contained in:
parent
074c9c52ef
commit
3bbf2c673c
@ -1404,7 +1404,7 @@ inline Int to_nonnegative_int(T value, Int upper) {
|
||||
template <typename T, typename Int, FMT_ENABLE_IF(!std::is_integral<T>::value)>
|
||||
inline Int to_nonnegative_int(T value, Int upper) {
|
||||
if (value < 0 || value > static_cast<T>(upper))
|
||||
throw format_error("invalid value");
|
||||
FMT_THROW(format_error("invalid value"));
|
||||
return static_cast<Int>(value);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user