From 9d946a2fc426f1e1c48c252e55dfadcacf79a3c6 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 4 Jul 2024 04:41:08 +0900 Subject: [PATCH] Fix compilation errors due to `make_format_args` in gcc 14.1.1 with c++20 (#4042) --- include/fmt/printf.h | 4 ++-- test/printf-test.cc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index ee4b06fd..072cc6b3 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -569,8 +569,8 @@ using wprintf_args = basic_format_args; /// arguments and can be implicitly converted to `printf_args`. template inline auto make_printf_args(T&... args) - -> decltype(make_format_args>(args...)) { - return make_format_args>(args...); + -> decltype(fmt::make_format_args>(args...)) { + return fmt::make_format_args>(args...); } template struct vprintf_args { diff --git a/test/printf-test.cc b/test/printf-test.cc index d3f03b7f..ee5cf0b0 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -6,6 +6,10 @@ // For the license information refer to format.h. #include "fmt/printf.h" +// include if possible for https://github.com/fmtlib/fmt/pull/4042 +#if FMT_HAS_INCLUDE() && FMT_CPLUSPLUS > 201703L +# include +#endif #include #include