From ad75e8859ac7b0d8487f757f2a8edc1a9f5b3178 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Fri, 7 Oct 2022 01:42:19 +0500 Subject: [PATCH] Fix broken condition Signed-off-by: Vladislav Shchapov --- include/fmt/core.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 6989c32de8e3..5f44a9748e46 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -779,7 +779,8 @@ FMT_CONSTEXPR void basic_format_parse_context::do_check_arg_id(int id) { // Argument id is only checked at compile-time during parsing because // formatting has its own validation. - if (detail::is_constant_evaluated() && FMT_GCC_VERSION >= 1200) { + if (detail::is_constant_evaluated() && + (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { using context = detail::compile_parse_context; if (id >= static_cast(this)->num_args()) on_error("argument not found"); @@ -789,7 +790,8 @@ basic_format_parse_context::do_check_arg_id(int id) { template FMT_CONSTEXPR void basic_format_parse_context::check_dynamic_spec(int arg_id) { - if (detail::is_constant_evaluated() && FMT_GCC_VERSION >= 1200) { + if (detail::is_constant_evaluated() && + (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 1200)) { using context = detail::compile_parse_context; static_cast(this)->check_dynamic_spec(arg_id); }