git repos / blockattack-game

blame: source/misc/embedded_libs/fmt-8.1.1/src/fmt.cc

normal view · raw

f8deb5b9 Poul Sander 2022-01-15 13:55 1
module;
f8deb5b9 Poul Sander 2022-01-15 13:55 2
#ifndef __cpp_modules
f8deb5b9 Poul Sander 2022-01-15 13:55 3
#  error Module not supported.
f8deb5b9 Poul Sander 2022-01-15 13:55 4
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 5
f8deb5b9 Poul Sander 2022-01-15 13:55 6
// put all implementation-provided headers into the global module fragment
f8deb5b9 Poul Sander 2022-01-15 13:55 7
// to prevent attachment to this module
f8deb5b9 Poul Sander 2022-01-15 13:55 8
#if !defined(_CRT_SECURE_NO_WARNINGS) && defined(_MSC_VER)
f8deb5b9 Poul Sander 2022-01-15 13:55 9
#  define _CRT_SECURE_NO_WARNINGS
f8deb5b9 Poul Sander 2022-01-15 13:55 10
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 11
#if !defined(WIN32_LEAN_AND_MEAN) && defined(_WIN32)
f8deb5b9 Poul Sander 2022-01-15 13:55 12
#  define WIN32_LEAN_AND_MEAN
f8deb5b9 Poul Sander 2022-01-15 13:55 13
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 14
f8deb5b9 Poul Sander 2022-01-15 13:55 15
#include <algorithm>
f8deb5b9 Poul Sander 2022-01-15 13:55 16
#include <cctype>
f8deb5b9 Poul Sander 2022-01-15 13:55 17
#include <cerrno>
f8deb5b9 Poul Sander 2022-01-15 13:55 18
#include <chrono>
f8deb5b9 Poul Sander 2022-01-15 13:55 19
#include <climits>
f8deb5b9 Poul Sander 2022-01-15 13:55 20
#include <clocale>
f8deb5b9 Poul Sander 2022-01-15 13:55 21
#include <cmath>
f8deb5b9 Poul Sander 2022-01-15 13:55 22
#include <cstdarg>
f8deb5b9 Poul Sander 2022-01-15 13:55 23
#include <cstddef>
f8deb5b9 Poul Sander 2022-01-15 13:55 24
#include <cstdint>
f8deb5b9 Poul Sander 2022-01-15 13:55 25
#include <cstdio>
f8deb5b9 Poul Sander 2022-01-15 13:55 26
#include <cstdlib>
f8deb5b9 Poul Sander 2022-01-15 13:55 27
#include <cstring>
f8deb5b9 Poul Sander 2022-01-15 13:55 28
#include <ctime>
f8deb5b9 Poul Sander 2022-01-15 13:55 29
#include <cwchar>
f8deb5b9 Poul Sander 2022-01-15 13:55 30
#include <exception>
f8deb5b9 Poul Sander 2022-01-15 13:55 31
#include <functional>
f8deb5b9 Poul Sander 2022-01-15 13:55 32
#include <iterator>
f8deb5b9 Poul Sander 2022-01-15 13:55 33
#include <limits>
f8deb5b9 Poul Sander 2022-01-15 13:55 34
#include <locale>
f8deb5b9 Poul Sander 2022-01-15 13:55 35
#include <memory>
f8deb5b9 Poul Sander 2022-01-15 13:55 36
#include <ostream>
f8deb5b9 Poul Sander 2022-01-15 13:55 37
#include <sstream>
f8deb5b9 Poul Sander 2022-01-15 13:55 38
#include <stdexcept>
f8deb5b9 Poul Sander 2022-01-15 13:55 39
#include <string>
f8deb5b9 Poul Sander 2022-01-15 13:55 40
#include <string_view>
f8deb5b9 Poul Sander 2022-01-15 13:55 41
#include <system_error>
f8deb5b9 Poul Sander 2022-01-15 13:55 42
#include <type_traits>
f8deb5b9 Poul Sander 2022-01-15 13:55 43
#include <utility>
f8deb5b9 Poul Sander 2022-01-15 13:55 44
#include <vector>
f8deb5b9 Poul Sander 2022-01-15 13:55 45
f8deb5b9 Poul Sander 2022-01-15 13:55 46
#if _MSC_VER
f8deb5b9 Poul Sander 2022-01-15 13:55 47
#  include <intrin.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 48
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 49
#if defined __APPLE__ || defined(__FreeBSD__)
f8deb5b9 Poul Sander 2022-01-15 13:55 50
#  include <xlocale.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 51
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 52
#if __has_include(<winapifamily.h>)
f8deb5b9 Poul Sander 2022-01-15 13:55 53
#  include <winapifamily.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 54
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 55
#if (__has_include(<fcntl.h>) || defined(__APPLE__) || \
f8deb5b9 Poul Sander 2022-01-15 13:55 56
     defined(__linux__)) &&                            \
f8deb5b9 Poul Sander 2022-01-15 13:55 57
    (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
f8deb5b9 Poul Sander 2022-01-15 13:55 58
#  include <fcntl.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 59
#  include <sys/stat.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 60
#  include <sys/types.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 61
#  ifndef _WIN32
f8deb5b9 Poul Sander 2022-01-15 13:55 62
#    include <unistd.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 63
#  else
f8deb5b9 Poul Sander 2022-01-15 13:55 64
#    include <io.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 65
#  endif
f8deb5b9 Poul Sander 2022-01-15 13:55 66
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 67
#ifdef _WIN32
f8deb5b9 Poul Sander 2022-01-15 13:55 68
#  include <windows.h>
f8deb5b9 Poul Sander 2022-01-15 13:55 69
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 70
f8deb5b9 Poul Sander 2022-01-15 13:55 71
export module fmt;
f8deb5b9 Poul Sander 2022-01-15 13:55 72
f8deb5b9 Poul Sander 2022-01-15 13:55 73
#define FMT_MODULE_EXPORT export
f8deb5b9 Poul Sander 2022-01-15 13:55 74
#define FMT_MODULE_EXPORT_BEGIN export {
f8deb5b9 Poul Sander 2022-01-15 13:55 75
#define FMT_MODULE_EXPORT_END }
f8deb5b9 Poul Sander 2022-01-15 13:55 76
#define FMT_BEGIN_DETAIL_NAMESPACE \
f8deb5b9 Poul Sander 2022-01-15 13:55 77
  }                                \
f8deb5b9 Poul Sander 2022-01-15 13:55 78
  namespace detail {
f8deb5b9 Poul Sander 2022-01-15 13:55 79
#define FMT_END_DETAIL_NAMESPACE \
f8deb5b9 Poul Sander 2022-01-15 13:55 80
  }                              \
f8deb5b9 Poul Sander 2022-01-15 13:55 81
  export {
f8deb5b9 Poul Sander 2022-01-15 13:55 82
// all library-provided declarations and definitions
f8deb5b9 Poul Sander 2022-01-15 13:55 83
// must be in the module purview to be exported
f8deb5b9 Poul Sander 2022-01-15 13:55 84
#include "fmt/args.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 85
#include "fmt/chrono.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 86
#include "fmt/color.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 87
#include "fmt/compile.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 88
#include "fmt/format.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 89
#include "fmt/os.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 90
#include "fmt/printf.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 91
#include "fmt/xchar.h"
f8deb5b9 Poul Sander 2022-01-15 13:55 92
f8deb5b9 Poul Sander 2022-01-15 13:55 93
// gcc doesn't yet implement private module fragments
f8deb5b9 Poul Sander 2022-01-15 13:55 94
#if !FMT_GCC_VERSION
f8deb5b9 Poul Sander 2022-01-15 13:55 95
module : private;
f8deb5b9 Poul Sander 2022-01-15 13:55 96
#endif
f8deb5b9 Poul Sander 2022-01-15 13:55 97
f8deb5b9 Poul Sander 2022-01-15 13:55 98
#include "format.cc"
f8deb5b9 Poul Sander 2022-01-15 13:55 99
#include "os.cc"
1970-01-01 00:00 100