From 099dd0c0d299d0f3541221928814e9001a69623a Mon Sep 17 00:00:00 2001 From: liushuyu Date: Sat, 8 Jan 2022 16:02:49 -0700 Subject: logging/log: use `underlying_type` instead of hardcoding types --- src/common/logging/log.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/logging/log.h b/src/common/logging/log.h index b6a14972f..096a441b8 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h @@ -16,10 +16,12 @@ // a generic formatter for enum classes (<= 32 bits) #if FMT_VERSION >= 80100 template -struct fmt::formatter, char>> : formatter { +struct fmt::formatter, char>> + : formatter> { template auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) { - return fmt::formatter::format(static_cast(value), ctx); + return fmt::formatter>::format( + static_cast>(value), ctx); } }; #endif -- cgit v1.2.3