Avoid include locale inline if C++20 modules are enabled (#4451)

MSVC hints with:
```
fmt\include\fmt\format-inl.h(26): warning C5244: '#include <locale>' in the purview of module 'fmt' appears erroneous.  Consider moving that directive before the module declaration, or replace the textual inclusion with 'import <locale>;'.
```

Then fails the build with `type redefinition`.
This commit is contained in:
Andreas Reischuck
2025-05-22 02:18:18 +02:00
committed by GitHub
parent b723c021df
commit f7033da09e

View File

@ -22,7 +22,7 @@
#include "format.h"
#if FMT_USE_LOCALE
#if FMT_USE_LOCALE && !defined(FMT_MODULE)
# include <locale>
#endif