diff --git a/include/fmt/core.h b/include/fmt/core.h index 6989c32d..5f44a974 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); }