From b4da8f22e1b1428e353bfbf7fb6d2013746a1cfe Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Mon, 15 May 2023 15:54:29 -0600 Subject: [PATCH] Always assert in FMT_THROW --- include/fmt/format.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index e6cfff86..76668395 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -114,10 +114,8 @@ FMT_END_NAMESPACE # define FMT_THROW(x) throw x # endif # else -# define FMT_THROW(x) \ - do { \ - FMT_ASSERT(false, (x).what()); \ - } while (false) +# define FMT_THROW(x) \ + ::fmt::detail::assert_fail(__FILE__, __LINE__, (x).what()) # endif #endif