From af8cd4e40425a0f1ed5dbf27c9fc664bf3cf977a Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Wed, 19 Jun 2024 22:00:29 +0200 Subject: [PATCH] Module purview can only contain direct preprocessor code (#4029) Resolved MSVC Warning C5202: a global module fragment can only contain preprocessor directives --- src/fmt.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fmt.cc b/src/fmt.cc index 28f4bb821ad8..fb514ad761fc 100644 --- a/src/fmt.cc +++ b/src/fmt.cc @@ -41,8 +41,6 @@ module; # include # include # include - -import std; #endif #include #include @@ -83,6 +81,10 @@ import std; export module fmt; +#ifdef FMT_IMPORT_STD +import std; +#endif + #define FMT_EXPORT export #define FMT_BEGIN_EXPORT export { #define FMT_END_EXPORT }