Commit 3bbf2c67 authored by Vladislav Shchapov's avatar Vladislav Shchapov Committed by Victor Zverovich

Fix throw with exceptions disabled

parent 074c9c52
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment