mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
Fix redefinition errors in module (regression fix)
Fixes type redefinition errors when compiling magic_enum as a module with the MAGIC_ENUM_USE_STD_MODULE preprocessor variable defined.
This commit is contained in:
parent
2e6e8bfff3
commit
ffb57fe2ca
1 changed files with 2 additions and 0 deletions
|
|
@ -59,7 +59,9 @@ std::string format_as(E e) {
|
|||
|
||||
#if defined(__cpp_lib_format)
|
||||
|
||||
#ifndef MAGIC_ENUM_USE_STD_MODULE
|
||||
#include <format>
|
||||
#endif
|
||||
|
||||
template <typename E>
|
||||
struct std::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>>, char>> : std::formatter<std::string_view, char> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue