config.hpp
6.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#ifndef BOOST_LEAF_CONFIG_HPP_INCLUDED
#define BOOST_LEAF_CONFIG_HPP_INCLUDED
// Copyright 2018-2022 Emil Dotchevski and Reverge Studios, Inc.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// The following is based in part on Boost Config.
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Martin Wille 2003.
// (C) Copyright Guillaume Melquiond 2003.
#ifndef BOOST_LEAF_ASSERT
# include <cassert>
# define BOOST_LEAF_ASSERT assert
#endif
////////////////////////////////////////
#ifdef BOOST_LEAF_DIAGNOSTICS
# warning BOOST_LEAF_DIAGNOSTICS has been renamed to BOOST_LEAF_CFG_DIAGNOSTICS.
# define BOOST_LEAF_CFG_DIAGNOSTICS BOOST_LEAF_DIAGNOSTICS
#endif
////////////////////////////////////////
#ifdef BOOST_LEAF_TLS_FREERTOS
# ifndef BOOST_LEAF_EMBEDDED
# define BOOST_LEAF_EMBEDDED
# endif
#endif
////////////////////////////////////////
#ifdef BOOST_LEAF_EMBEDDED
# ifndef BOOST_LEAF_CFG_DIAGNOSTICS
# define BOOST_LEAF_CFG_DIAGNOSTICS 0
# endif
# ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR
# define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 0
# endif
# ifndef BOOST_LEAF_CFG_STD_STRING
# define BOOST_LEAF_CFG_STD_STRING 0
# endif
# ifndef BOOST_LEAF_CFG_CAPTURE
# define BOOST_LEAF_CFG_CAPTURE 0
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_CFG_DIAGNOSTICS
# define BOOST_LEAF_CFG_DIAGNOSTICS 1
#endif
#ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR
# define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 1
#endif
#ifndef BOOST_LEAF_CFG_STD_STRING
# define BOOST_LEAF_CFG_STD_STRING 1
#endif
#ifndef BOOST_LEAF_CFG_CAPTURE
# define BOOST_LEAF_CFG_CAPTURE 1
#endif
#ifndef BOOST_LEAF_CFG_WIN32
# define BOOST_LEAF_CFG_WIN32 0
#endif
#ifndef BOOST_LEAF_CFG_GNUC_STMTEXPR
# ifdef __GNUC__
# define BOOST_LEAF_CFG_GNUC_STMTEXPR 1
# else
# define BOOST_LEAF_CFG_GNUC_STMTEXPR 0
# endif
#endif
#if BOOST_LEAF_CFG_DIAGNOSTICS!=0 && BOOST_LEAF_CFG_DIAGNOSTICS!=1
# error BOOST_LEAF_CFG_DIAGNOSTICS must be 0 or 1.
#endif
#if BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=0 && BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=1
# error BOOST_LEAF_CFG_STD_SYSTEM_ERROR must be 0 or 1.
#endif
#if BOOST_LEAF_CFG_STD_STRING!=0 && BOOST_LEAF_CFG_STD_STRING!=1
# error BOOST_LEAF_CFG_STD_STRING must be 0 or 1.
#endif
#if BOOST_LEAF_CFG_CAPTURE!=0 && BOOST_LEAF_CFG_CAPTURE!=1
# error BOOST_LEAF_CFG_CAPTURE must be 0 or 1.
#endif
#if BOOST_LEAF_CFG_DIAGNOSTICS && !BOOST_LEAF_CFG_STD_STRING
# error BOOST_LEAF_CFG_DIAGNOSTICS requires the use of std::string
#endif
#if BOOST_LEAF_CFG_WIN32!=0 && BOOST_LEAF_CFG_WIN32!=1
# error BOOST_LEAF_CFG_WIN32 must be 0 or 1.
#endif
#if BOOST_LEAF_CFG_GNUC_STMTEXPR!=0 && BOOST_LEAF_CFG_GNUC_STMTEXPR!=1
# error BOOST_LEAF_CFG_GNUC_STMTEXPR must be 0 or 1.
#endif
////////////////////////////////////////
// Configure BOOST_LEAF_NO_EXCEPTIONS, unless already #defined
#ifndef BOOST_LEAF_NO_EXCEPTIONS
# if defined(__clang__) && !defined(__ibmxl__)
// Clang C++ emulates GCC, so it has to appear early.
# if !__has_feature(cxx_exceptions)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__DMC__)
// Digital Mars C++
# if !defined(_CPPUNWIND)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__GNUC__) && !defined(__ibmxl__)
// GNU C++:
# if !defined(__EXCEPTIONS)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__KCC)
// Kai C++
# if !defined(_EXCEPTIONS)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__CODEGEARC__)
// CodeGear - must be checked for before Borland
# if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__BORLANDC__)
// Borland
# if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__MWERKS__)
// Metrowerks CodeWarrior
# if !__option(exceptions)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
// IBM z/OS XL C/C++
# if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(__ibmxl__)
// IBM XL C/C++ for Linux (Little Endian)
# if !__has_feature(cxx_exceptions)
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# elif defined(_MSC_VER)
// Microsoft Visual C++
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# if !_CPPUNWIND
# define BOOST_LEAF_NO_EXCEPTIONS
# endif
# endif
#endif
////////////////////////////////////////
#ifdef _MSC_VER
# define BOOST_LEAF_ALWAYS_INLINE __forceinline
#else
# define BOOST_LEAF_ALWAYS_INLINE __attribute__((always_inline)) inline
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_NODISCARD
# if __cplusplus >= 201703L
# define BOOST_LEAF_NODISCARD [[nodiscard]]
# else
# define BOOST_LEAF_NODISCARD
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_CONSTEXPR
# if __cplusplus > 201402L
# define BOOST_LEAF_CONSTEXPR constexpr
# else
# define BOOST_LEAF_CONSTEXPR
# endif
#endif
////////////////////////////////////////
#ifndef BOOST_LEAF_NO_EXCEPTIONS
# include <exception>
# if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
# define BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS 1
# else
# define BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS 0
# endif
#endif
////////////////////////////////////////
#ifdef __GNUC__
# define BOOST_LEAF_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
#else
# define BOOST_LEAF_SYMBOL_VISIBLE
#endif
////////////////////////////////////////
#if defined(__GNUC__) && !(defined(__clang__) || defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) < 409
# ifndef BOOST_LEAF_NO_CXX11_REF_QUALIFIERS
# define BOOST_LEAF_NO_CXX11_REF_QUALIFIERS
# endif
#endif
////////////////////////////////////////
// Configure TLS access
#include <boost/leaf/config/tls.hpp>
////////////////////////////////////////
#endif