From b291b0ce5a76e808e05fc0141154e963407372da Mon Sep 17 00:00:00 2001 From: neargye Date: Wed, 20 Sep 2023 18:44:31 +0400 Subject: [PATCH] fix fmt::formatter --- include/magic_enum_format.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/magic_enum_format.hpp b/include/magic_enum_format.hpp index bd725b5ea..03f3e44ea 100644 --- a/include/magic_enum_format.hpp +++ b/include/magic_enum_format.hpp @@ -80,8 +80,8 @@ struct std::formatter> && mag #include template -struct fmt::formatter> && magic_enum::customize::enum_format_enabled(), char>> : fmt::formatter { - auto format(E e, format_context& ctx) { +struct fmt::formatter> && magic_enum::customize::enum_format_enabled(), char>> : fmt::formatter { + auto format(E e, format_context& ctx) const { static_assert(std::is_same_v, "formatter requires string_view::value_type type same as char."); using D = std::decay_t;