Guard more system headers by FMT_MODULE (#4006)

* Guard more system headers by `FMT_MODULE`

* Merge FMT_MODULE and FMT_IMPORT_STD
This commit is contained in:
LoveSy authored and GitHub committed 2024-06-14 10:53:51 -07:00
1 parent 98dd673cf8
commit 8687315e86
14 files changed
+69 -65

No files matched your search

+3 -4
View File
@@ -38,7 +38,7 @@
# define FMT_REMOVE_TRANSITIVE_INCLUDES
#endif
#ifndef FMT_IMPORT_STD
#ifndef FMT_MODULE
# include <cmath> // std::signbit
# include <cstdint> // uint32_t
# include <cstring> // std::memcpy
@@ -56,15 +56,14 @@
#include "base.h"
// Checking FMT_CPLUSPLUS for warning suppression in MSVC.
#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L && \
!defined(FMT_IMPORT_STD)
#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L && !defined(FMT_MODULE)
# include <bit> // std::bit_cast
#endif
// libc++ supports string_view in pre-c++17.
#if FMT_HAS_INCLUDE(<string_view>) && \
(FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
# ifndef FMT_IMPORT_STD
# if !defined(FMT_MODULE)
# include <string_view>
# endif
# define FMT_USE_STRING_VIEW