1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

Support fmt in C++20 module

This commit is contained in:
CrackedMatter 2024-12-21 20:12:10 +01:00 committed by GitHub
parent 1a1824df7a
commit 177ef077d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,9 @@
module; module;
#include <version> #include <version>
#if __has_include(<fmt/base.h>)
#include <fmt/base.h>
#endif
#ifndef MAGIC_ENUM_USE_STD_MODULE #ifndef MAGIC_ENUM_USE_STD_MODULE
#include <magic_enum/magic_enum_all.hpp> #include <magic_enum/magic_enum_all.hpp>
#endif #endif
@ -74,3 +77,9 @@ export namespace std {
using std::formatter; using std::formatter;
} }
#endif #endif
#if defined(FMT_VERSION)
export namespace fmt {
using fmt::formatter;
}
#endif