diff --git a/include/magic_enum_format.hpp b/include/magic_enum_format.hpp index 99ce9d8..79b269f 100644 --- a/include/magic_enum_format.hpp +++ b/include/magic_enum_format.hpp @@ -55,7 +55,7 @@ namespace magic_enum::customize { template struct std::formatter && magic_enum::customize::enum_format_enabled(), char>> : std::formatter { - auto format(E e, format_context& ctx) { + 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;