mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-08 23:24:20 +00:00
Support fmt and std::format in C++20 module (#394)
This commit is contained in:
parent
341521b9c0
commit
2e6e8bfff3
1 changed files with 12 additions and 0 deletions
|
|
@ -1,7 +1,13 @@
|
|||
module;
|
||||
|
||||
#include <version>
|
||||
#if __has_include(<fmt/format.h>)
|
||||
#include <fmt/format.h>
|
||||
#endif
|
||||
#ifndef MAGIC_ENUM_USE_STD_MODULE
|
||||
#if defined(__cpp_lib_format)
|
||||
#include <format>
|
||||
#endif
|
||||
#include <magic_enum/magic_enum_all.hpp>
|
||||
#endif
|
||||
|
||||
|
|
@ -85,3 +91,9 @@ export namespace std {
|
|||
using std::formatter;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FMT_VERSION)
|
||||
export namespace fmt {
|
||||
using fmt::formatter;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue