From ffb57fe2ca09473023e38e4f745368ff1363ba12 Mon Sep 17 00:00:00 2001 From: ChristopherCanfield Date: Wed, 10 Dec 2025 15:18:50 -0500 Subject: [PATCH] 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. --- include/magic_enum/magic_enum_format.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/magic_enum/magic_enum_format.hpp b/include/magic_enum/magic_enum_format.hpp index 342dec4..603c111 100644 --- a/include/magic_enum/magic_enum_format.hpp +++ b/include/magic_enum/magic_enum_format.hpp @@ -59,7 +59,9 @@ std::string format_as(E e) { #if defined(__cpp_lib_format) +#ifndef MAGIC_ENUM_USE_STD_MODULE #include +#endif template struct std::formatter>, char>> : std::formatter {