|
38 | 38 | # define FMT_REMOVE_TRANSITIVE_INCLUDES
|
39 | 39 | #endif
|
40 | 40 |
|
41 |
| -#include <cmath> // std::signbit |
42 |
| -#include <cstdint> // uint32_t |
43 |
| -#include <cstring> // std::memcpy |
44 |
| -#include <initializer_list> // std::initializer_list |
45 |
| -#include <limits> // std::numeric_limits |
46 |
| -#if defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI) |
| 41 | +#ifndef FMT_IMPORT_STD |
| 42 | +# include <cmath> // std::signbit |
| 43 | +# include <cstdint> // uint32_t |
| 44 | +# include <cstring> // std::memcpy |
| 45 | +# include <initializer_list> // std::initializer_list |
| 46 | +# include <limits> // std::numeric_limits |
| 47 | +# if defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI) |
47 | 48 | // Workaround for pre gcc 5 libstdc++.
|
48 |
| -# include <memory> // std::allocator_traits |
| 49 | +# include <memory> // std::allocator_traits |
| 50 | +# endif |
| 51 | +# include <stdexcept> // std::runtime_error |
| 52 | +# include <string> // std::string |
| 53 | +# include <system_error> // std::system_error |
49 | 54 | #endif
|
50 |
| -#include <stdexcept> // std::runtime_error |
51 |
| -#include <string> // std::string |
52 |
| -#include <system_error> // std::system_error |
53 | 55 |
|
54 | 56 | #include "base.h"
|
55 | 57 |
|
56 | 58 | // Checking FMT_CPLUSPLUS for warning suppression in MSVC.
|
57 |
| -#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L |
| 59 | +#if FMT_HAS_INCLUDE(<bit>) && FMT_CPLUSPLUS > 201703L && !defined(FMT_IMPORT_STD) |
58 | 60 | # include <bit> // std::bit_cast
|
59 | 61 | #endif
|
60 | 62 |
|
61 | 63 | // libc++ supports string_view in pre-c++17.
|
62 | 64 | #if FMT_HAS_INCLUDE(<string_view>) && \
|
63 | 65 | (FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
|
64 |
| -# include <string_view> |
| 66 | +# ifndef FMT_IMPORT_STD |
| 67 | +# include <string_view> |
| 68 | +# endif |
65 | 69 | # define FMT_USE_STRING_VIEW
|
66 | 70 | #endif
|
67 | 71 |
|
|
0 commit comments