From e2797c4627667b19624c293fceead4ff8d0c37d4 Mon Sep 17 00:00:00 2001 From: neargye Date: Thu, 14 Nov 2024 00:18:31 +0100 Subject: [PATCH] wip --- include/magic_enum/magic_enum_format.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/magic_enum/magic_enum_format.hpp b/include/magic_enum/magic_enum_format.hpp index 70c789cd4..15bf43c80 100644 --- a/include/magic_enum/magic_enum_format.hpp +++ b/include/magic_enum/magic_enum_format.hpp @@ -69,4 +69,16 @@ struct std::formatter>, char> #endif +#if defined(FMT_VERSION) + +template +struct fmt::formatter>, char>> : fmt::formatter { + template + auto format(E e, FormatContext& ctx) const { + return formatter::format(format_as(e), ctx); + } +}; + +#endif + #endif // NEARGYE_MAGIC_ENUM_FORMAT_HPP