From 3f508d9e5ca1ad3cb6adb67e5fa09e93c277ff3e Mon Sep 17 00:00:00 2001 From: "Aengus.Jiang" Date: Fri, 27 Jun 2025 11:35:15 +0800 Subject: [PATCH] fix bug --- include/spdlog/fmt/bundled/format.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index 60dd3839..3cd25425 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -73,9 +73,9 @@ #endif // FMT_MODULE #if (defined(__GNUC__) && __GNUC__ < 5) -# define OPERATOR_LITERAL(suffix) operator"" suffix +# define OPERATOR_LITERAL(suffix) operator"" _suffix #else -# define OPERATOR_LITERAL(suffix) operator""suffix +# define OPERATOR_LITERAL(suffix) operator""_suffix #endif #if defined(FMT_USE_NONTYPE_TEMPLATE_ARGS) @@ -3999,7 +3999,7 @@ template struct nested_formatter { inline namespace literals { #if FMT_USE_NONTYPE_TEMPLATE_ARGS -template constexpr auto OPERATOR_LITERAL(_a)() { +template constexpr auto OPERATOR_LITERAL(a)() { using char_t = remove_cvref_t; return detail::udl_arg(); } @@ -4012,7 +4012,7 @@ template constexpr auto OPERATOR_LITERAL(_a)() { * using namespace fmt::literals; * fmt::print("The answer is {answer}.", "answer"_a=42); */ -constexpr auto OPERATOR_LITERAL(_a)(const char* s, size_t) -> detail::udl_arg { +constexpr auto OPERATOR_LITERAL(a)(const char* s, size_t) -> detail::udl_arg { return {s}; } #endif // FMT_USE_NONTYPE_TEMPLATE_ARGS