From 3bbf2c673caf9ff8b49daa6364fbc1c6d067834a Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Sun, 26 Dec 2021 21:15:03 +0500 Subject: [PATCH] Fix throw with exceptions disabled --- include/fmt/chrono.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 85680b3b..31fee070 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1404,7 +1404,7 @@ inline Int to_nonnegative_int(T value, Int upper) { template ::value)> inline Int to_nonnegative_int(T value, Int upper) { if (value < 0 || value > static_cast(upper)) - throw format_error("invalid value"); + FMT_THROW(format_error("invalid value")); return static_cast(value); }