mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-22 10:30:05 +00:00
Cleanup includes
This commit is contained in:
parent
0434026a95
commit
febd8ed5fe
@ -38,6 +38,8 @@
|
||||
# define FMT_REMOVE_TRANSITIVE_INCLUDES
|
||||
#endif
|
||||
|
||||
#include "base.h"
|
||||
|
||||
#ifndef FMT_MODULE
|
||||
# include <cmath> // std::signbit
|
||||
# include <cstdint> // uint32_t
|
||||
@ -51,23 +53,19 @@
|
||||
# include <stdexcept> // std::runtime_error
|
||||
# include <string> // std::string
|
||||
# include <system_error> // std::system_error
|
||||
#endif
|
||||
|
||||
#include "base.h"
|
||||
|
||||
// Checking FMT_CPLUSPLUS for warning suppression in MSVC.
|
||||
#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L && !defined(FMT_MODULE)
|
||||
# include <bit> // std::bit_cast
|
||||
#endif
|
||||
# if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L
|
||||
# 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))
|
||||
# if !defined(FMT_MODULE)
|
||||
# if FMT_HAS_INCLUDE(<string_view>) && \
|
||||
(FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
|
||||
# include <string_view>
|
||||
# define FMT_USE_STRING_VIEW
|
||||
# endif
|
||||
# define FMT_USE_STRING_VIEW
|
||||
#endif
|
||||
#endif // FMT_MODULE
|
||||
|
||||
#if defined __cpp_inline_variables && __cpp_inline_variables >= 201606L
|
||||
# define FMT_INLINE_VARIABLE inline
|
||||
|
@ -8,20 +8,18 @@
|
||||
#ifndef FMT_OS_H_
|
||||
#define FMT_OS_H_
|
||||
|
||||
#include "format.h"
|
||||
|
||||
#ifndef FMT_MODULE
|
||||
# include <cerrno>
|
||||
# include <cstddef>
|
||||
# include <cstdio>
|
||||
# include <system_error> // std::system_error
|
||||
#endif
|
||||
|
||||
#include "format.h"
|
||||
|
||||
#if defined __APPLE__ || defined(__FreeBSD__)
|
||||
# if FMT_HAS_INCLUDE(<xlocale.h>) && !defined(FMT_MODULE)
|
||||
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X
|
||||
# if FMT_HAS_INCLUDE(<xlocale.h>)
|
||||
# include <xlocale.h> // LC_NUMERIC_MASK on macOS
|
||||
# endif
|
||||
#endif
|
||||
#endif // FMT_MODULE
|
||||
|
||||
#ifndef FMT_USE_FCNTL
|
||||
// UWP doesn't provide _pipe.
|
||||
|
@ -8,6 +8,9 @@
|
||||
#ifndef FMT_STD_H_
|
||||
#define FMT_STD_H_
|
||||
|
||||
#include "format.h"
|
||||
#include "ostream.h"
|
||||
|
||||
#ifndef FMT_MODULE
|
||||
# include <atomic>
|
||||
# include <bitset>
|
||||
@ -20,16 +23,7 @@
|
||||
# include <typeinfo>
|
||||
# include <utility>
|
||||
# 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.
|
||||
# if FMT_CPLUSPLUS >= 201703L
|
||||
# if FMT_HAS_INCLUDE(<filesystem>)
|
||||
@ -50,6 +44,10 @@
|
||||
# if FMT_CPLUSPLUS > 201703L && FMT_HAS_INCLUDE(<source_location>)
|
||||
# include <source_location>
|
||||
# endif
|
||||
#endif // FMT_MODULE
|
||||
|
||||
#if FMT_HAS_INCLUDE(<version>)
|
||||
# include <version>
|
||||
#endif
|
||||
|
||||
// GCC 4 does not support FMT_HAS_INCLUDE.
|
||||
|
@ -8,16 +8,15 @@
|
||||
#ifndef FMT_XCHAR_H_
|
||||
#define FMT_XCHAR_H_
|
||||
|
||||
#ifndef FMT_MODULE
|
||||
# include <cwchar>
|
||||
#endif
|
||||
|
||||
#include "color.h"
|
||||
#include "format.h"
|
||||
#include "ranges.h"
|
||||
|
||||
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) && !defined(FMT_MODULE)
|
||||
# include <locale>
|
||||
#ifndef FMT_MODULE
|
||||
# include <cwchar>
|
||||
# if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
|
||||
# include <locale>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FMT_BEGIN_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user