From ade36e0a142b56f4d8eccf6bc0d064441f245540 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 11 Sep 2023 08:51:22 +0100 Subject: [PATCH] Fix compilation error if `PACKED` is defined before including FMT Reduces the chance of conflicts between a macro declaration and the template argument name by using CamelCase (`PACKED` -> `IsPacked`) Fixes #3632 --- include/fmt/core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index f9e3b7d6..fc8e886a 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1554,7 +1554,7 @@ constexpr auto encode_types() -> unsigned long long { template struct type_is_unformattable_for; #endif -template +template FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value { using arg_type = remove_cvref_t().map(val))>; @@ -1591,7 +1591,7 @@ FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg { return arg; } -template +template FMT_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg { return make_arg(val); }