Cleanup includes

This commit is contained in:
Victor Zverovich
2024-06-16 10:59:06 -07:00
parent 0434026a95
commit febd8ed5fe
4 changed files with 26 additions and 33 deletions

View File

@ -38,6 +38,8 @@
# define FMT_REMOVE_TRANSITIVE_INCLUDES # define FMT_REMOVE_TRANSITIVE_INCLUDES
#endif #endif
#include "base.h"
#ifndef FMT_MODULE #ifndef FMT_MODULE
# include <cmath> // std::signbit # include <cmath> // std::signbit
# include <cstdint> // uint32_t # include <cstdint> // uint32_t
@ -51,23 +53,19 @@
# include <stdexcept> // std::runtime_error # include <stdexcept> // std::runtime_error
# include <string> // std::string # include <string> // std::string
# include <system_error> // std::system_error # include <system_error> // std::system_error
#endif
#include "base.h"
// Checking FMT_CPLUSPLUS for warning suppression in MSVC. // Checking FMT_CPLUSPLUS for warning suppression in MSVC.
#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L && !defined(FMT_MODULE) # if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L
# include <bit> // std::bit_cast # include <bit> // std::bit_cast
# endif # endif
// libc++ supports string_view in pre-c++17. // libc++ supports string_view in pre-c++17.
# if FMT_HAS_INCLUDE(<string_view>) && \ # if FMT_HAS_INCLUDE(<string_view>) && \
(FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION)) (FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
# if !defined(FMT_MODULE)
# include <string_view> # include <string_view>
# endif
# define FMT_USE_STRING_VIEW # define FMT_USE_STRING_VIEW
# endif # endif
#endif // FMT_MODULE
#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L #if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
# define FMT_INLINE_VARIABLE inline # define FMT_INLINE_VARIABLE inline

View File

@ -8,20 +8,18 @@
#ifndef FMT_OS_H_ #ifndef FMT_OS_H_
#define FMT_OS_H_ #define FMT_OS_H_
#include "format.h"
#ifndef FMT_MODULE #ifndef FMT_MODULE
# include <cerrno> # include <cerrno>
# include <cstddef> # include <cstddef>
# include <cstdio> # include <cstdio>
# include <system_error> // std::system_error # include <system_error> // std::system_error
#endif
#include "format.h" # if FMT_HAS_INCLUDE(<xlocale.h>)
# include <xlocale.h> // LC_NUMERIC_MASK on macOS
#if defined __APPLE__ || defined(__FreeBSD__)
# if FMT_HAS_INCLUDE(<xlocale.h>) && !defined(FMT_MODULE)
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X
# endif
# endif # endif
#endif // FMT_MODULE
#ifndef FMT_USE_FCNTL #ifndef FMT_USE_FCNTL
// UWP doesn't provide _pipe. // UWP doesn't provide _pipe.

View File

@ -8,6 +8,9 @@
#ifndef FMT_STD_H_ #ifndef FMT_STD_H_
#define FMT_STD_H_ #define FMT_STD_H_
#include "format.h"
#include "ostream.h"
#ifndef FMT_MODULE #ifndef FMT_MODULE
# include <atomic> # include <atomic>
# include <bitset> # include <bitset>
@ -20,16 +23,7 @@
# include <typeinfo> # include <typeinfo>
# include <utility> # include <utility>
# include <vector> # include <vector>
#endif
#include "format.h"
#include "ostream.h"
#if FMT_HAS_INCLUDE(<version>)
# include <version>
#endif
#ifndef FMT_MODULE
// Checking FMT_CPLUSPLUS for warning suppression in MSVC. // Checking FMT_CPLUSPLUS for warning suppression in MSVC.
# if FMT_CPLUSPLUS >= 201703L # if FMT_CPLUSPLUS >= 201703L
# if FMT_HAS_INCLUDE(<filesystem>) # if FMT_HAS_INCLUDE(<filesystem>)
@ -50,6 +44,10 @@
# if FMT_CPLUSPLUS > 201703L && FMT_HAS_INCLUDE(<source_location>) # if FMT_CPLUSPLUS > 201703L && FMT_HAS_INCLUDE(<source_location>)
# include <source_location> # include <source_location>
# endif # endif
#endif // FMT_MODULE
#if FMT_HAS_INCLUDE(<version>)
# include <version>
#endif #endif
// GCC 4 does not support FMT_HAS_INCLUDE. // GCC 4 does not support FMT_HAS_INCLUDE.

View File

@ -8,17 +8,16 @@
#ifndef FMT_XCHAR_H_ #ifndef FMT_XCHAR_H_
#define FMT_XCHAR_H_ #define FMT_XCHAR_H_
#ifndef FMT_MODULE
# include <cwchar>
#endif
#include "color.h" #include "color.h"
#include "format.h" #include "format.h"
#include "ranges.h" #include "ranges.h"
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) && !defined(FMT_MODULE) #ifndef FMT_MODULE
# include <cwchar>
# if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
# include <locale> # include <locale>
# endif # endif
#endif
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
namespace detail { namespace detail {