Skip to content

Commit

Permalink
fix fmt::formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Neargye committed Sep 20, 2023
1 parent 33e4bb8 commit b291b0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/magic_enum_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ struct std::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>> && mag
#include <fmt/format.h>

template <typename E>
struct fmt::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>> && magic_enum::customize::enum_format_enabled<E>(), char>> : fmt::formatter<std::string_view, char> {
auto format(E e, format_context& ctx) {
struct fmt::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>> && magic_enum::customize::enum_format_enabled<E>(), char>> : fmt::formatter<std::string_view> {
auto format(E e, format_context& ctx) const {
static_assert(std::is_same_v<char, string_view::value_type>, "formatter requires string_view::value_type type same as char.");
using D = std::decay_t<E>;

Expand Down

0 comments on commit b291b0c

Please sign in to comment.