Include fmt 11.0.2
[openal-soft.git] / fmt-11.0.2 / src / fmt.cc
blobfb514ad761fc067d87c050abd45253c735a8ed9c
1 module;
3 // Put all implementation-provided headers into the global module fragment
4 // to prevent attachment to this module.
5 #ifndef FMT_IMPORT_STD
6 # include <algorithm>
7 # include <bitset>
8 # include <chrono>
9 # include <cmath>
10 # include <complex>
11 # include <cstddef>
12 # include <cstdint>
13 # include <cstdio>
14 # include <cstdlib>
15 # include <cstring>
16 # include <ctime>
17 # include <exception>
18 # include <expected>
19 # include <filesystem>
20 # include <fstream>
21 # include <functional>
22 # include <iterator>
23 # include <limits>
24 # include <locale>
25 # include <memory>
26 # include <optional>
27 # include <ostream>
28 # include <source_location>
29 # include <stdexcept>
30 # include <string>
31 # include <string_view>
32 # include <system_error>
33 # include <thread>
34 # include <type_traits>
35 # include <typeinfo>
36 # include <utility>
37 # include <variant>
38 # include <vector>
39 #else
40 # include <limits.h>
41 # include <stdint.h>
42 # include <stdio.h>
43 # include <time.h>
44 #endif
45 #include <cerrno>
46 #include <climits>
47 #include <version>
49 #if __has_include(<cxxabi.h>)
50 # include <cxxabi.h>
51 #endif
52 #if defined(_MSC_VER) || defined(__MINGW32__)
53 # include <intrin.h>
54 #endif
55 #if defined __APPLE__ || defined(__FreeBSD__)
56 # include <xlocale.h>
57 #endif
58 #if __has_include(<winapifamily.h>)
59 # include <winapifamily.h>
60 #endif
61 #if (__has_include(<fcntl.h>) || defined(__APPLE__) || \
62 defined(__linux__)) && \
63 (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
64 # include <fcntl.h>
65 # include <sys/stat.h>
66 # include <sys/types.h>
67 # ifndef _WIN32
68 # include <unistd.h>
69 # else
70 # include <io.h>
71 # endif
72 #endif
73 #ifdef _WIN32
74 # if defined(__GLIBCXX__)
75 # include <ext/stdio_filebuf.h>
76 # include <ext/stdio_sync_filebuf.h>
77 # endif
78 # define WIN32_LEAN_AND_MEAN
79 # include <windows.h>
80 #endif
82 export module fmt;
84 #ifdef FMT_IMPORT_STD
85 import std;
86 #endif
88 #define FMT_EXPORT export
89 #define FMT_BEGIN_EXPORT export {
90 #define FMT_END_EXPORT }
92 // If you define FMT_ATTACH_TO_GLOBAL_MODULE
93 // - all declarations are detached from module 'fmt'
94 // - the module behaves like a traditional static library, too
95 // - all library symbols are mangled traditionally
96 // - you can mix TUs with either importing or #including the {fmt} API
97 #ifdef FMT_ATTACH_TO_GLOBAL_MODULE
98 extern "C++" {
99 #endif
101 #ifndef FMT_OS
102 # define FMT_OS 1
103 #endif
105 // All library-provided declarations and definitions must be in the module
106 // purview to be exported.
107 #include "fmt/args.h"
108 #include "fmt/chrono.h"
109 #include "fmt/color.h"
110 #include "fmt/compile.h"
111 #include "fmt/format.h"
112 #if FMT_OS
113 # include "fmt/os.h"
114 #endif
115 #include "fmt/ostream.h"
116 #include "fmt/printf.h"
117 #include "fmt/ranges.h"
118 #include "fmt/std.h"
119 #include "fmt/xchar.h"
121 #ifdef FMT_ATTACH_TO_GLOBAL_MODULE
123 #endif
125 // gcc doesn't yet implement private module fragments
126 #if !FMT_GCC_VERSION
127 module :private;
128 #endif
130 #if FMT_HAS_INCLUDE("format.cc")
131 # include "format.cc"
132 #endif
133 #if FMT_OS && FMT_HAS_INCLUDE("os.cc")
134 # include "os.cc"
135 #endif