From 177ef077d3cf563c3a10426800ed1607aa674ea2 Mon Sep 17 00:00:00 2001 From: CrackedMatter <81803926+CrackedMatter@users.noreply.github.com> Date: Sat, 21 Dec 2024 20:12:10 +0100 Subject: [PATCH] Support fmt in C++20 module --- module/magic_enum.cppm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/magic_enum.cppm b/module/magic_enum.cppm index e4898cb..32c760f 100644 --- a/module/magic_enum.cppm +++ b/module/magic_enum.cppm @@ -1,6 +1,9 @@ module; #include +#if __has_include() +#include +#endif #ifndef MAGIC_ENUM_USE_STD_MODULE #include #endif @@ -74,3 +77,9 @@ export namespace std { using std::formatter; } #endif + +#if defined(FMT_VERSION) +export namespace fmt { + using fmt::formatter; +} +#endif