]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libc++/include/__config
Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
[FreeBSD/FreeBSD.git] / contrib / libc++ / include / __config
1 // -*- C++ -*-
2 //===--------------------------- __config ---------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef _LIBCPP_CONFIG
12 #define _LIBCPP_CONFIG
13
14 #if defined(_MSC_VER) && !defined(__clang__)
15 #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
16 #endif
17
18 #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
19 #pragma GCC system_header
20 #endif
21
22 #ifdef __cplusplus
23
24 #ifdef __GNUC__
25 #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
26 #else
27 #define _GNUC_VER 0
28 #endif
29
30 #define _LIBCPP_VERSION 4000
31
32 #ifndef _LIBCPP_ABI_VERSION
33 #define _LIBCPP_ABI_VERSION 1
34 #endif
35
36 #if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2
37 // Change short string representation so that string data starts at offset 0,
38 // improving its alignment in some cases.
39 #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
40 // Fix deque iterator type in order to support incomplete types.
41 #define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
42 // Fix undefined behavior in how std::list stores it's linked nodes.
43 #define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB
44 // Fix undefined behavior in  how __tree stores its end and parent nodes.
45 #define _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB
46 // Fix undefined behavior in how __hash_table stores it's pointer types
47 #define _LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB
48 #define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
49 #define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
50 #define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
51 // Don't use a nullptr_t simulation type in C++03 instead using C++11 nullptr
52 // provided under the alternate keyword __nullptr, which changes the mangling
53 // of nullptr_t. This option is ABI incompatible with GCC in C++03 mode.
54 #define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR
55 // Define the `pointer_safety` enum as a C++11 strongly typed enumeration
56 // instead of as a class simulating an enum. If this option is enabled
57 // `pointer_safety` and `get_pointer_safety()` will no longer be available
58 // in C++03.
59 #define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
60 #elif _LIBCPP_ABI_VERSION == 1
61 #if !defined(_WIN32)
62 // Enable compiling a definition of error_category() into the libc++ dylib.
63 #define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR
64 #endif
65 // Feature macros for disabling pre ABI v1 features. All of these options
66 // are deprecated.
67 #if defined(__FreeBSD__)
68 #define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
69 #endif
70 #endif
71
72 #ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
73 #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
74        use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
75 #endif
76
77 #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y
78 #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y)
79
80 #define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION)
81
82 #if __cplusplus < 201103L
83 #define _LIBCPP_CXX03_LANG
84 #endif
85
86 #ifndef __has_attribute
87 #define __has_attribute(__x) 0
88 #endif
89 #ifndef __has_builtin
90 #define __has_builtin(__x) 0
91 #endif
92 #ifndef __has_extension
93 #define __has_extension(__x) 0
94 #endif
95 #ifndef __has_feature
96 #define __has_feature(__x) 0
97 #endif
98 // '__is_identifier' returns '0' if '__x' is a reserved identifier provided by
99 // the compiler and '1' otherwise.
100 #ifndef __is_identifier
101 #define __is_identifier(__x) 1
102 #endif
103
104 #if defined(__clang__)
105 #define _LIBCPP_COMPILER_CLANG
106 # ifndef __apple_build_version__
107 #   define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
108 # endif
109 #elif defined(__GNUC__)
110 #define _LIBCPP_COMPILER_GCC
111 #elif defined(_MSC_VER)
112 #define _LIBCPP_COMPILER_MSVC
113 #elif defined(__IBMCPP__)
114 #define _LIBCPP_COMPILER_IBM
115 #endif
116
117 #ifndef _LIBCPP_CLANG_VER
118 # define _LIBCPP_CLANG_VER 0
119 #endif
120
121 // FIXME: ABI detection should be done via compiler builtin macros. This
122 // is just a placeholder until Clang implements such macros. For now assume
123 // that Windows compilers pretending to be MSVC++ target the microsoft ABI.
124 #if defined(_WIN32) && defined(_MSC_VER)
125 # define _LIBCPP_ABI_MICROSOFT
126 #else
127 # define _LIBCPP_ABI_ITANIUM
128 #endif
129
130 // Need to detect which libc we're using if we're on Linux.
131 #if defined(__linux__)
132 #include <features.h>
133 #if !defined(__GLIBC_PREREQ)
134 #define __GLIBC_PREREQ(a, b) 0
135 #endif // !defined(__GLIBC_PREREQ)
136 #endif // defined(__linux__)
137
138 #ifdef __LITTLE_ENDIAN__
139 #if __LITTLE_ENDIAN__
140 #define _LIBCPP_LITTLE_ENDIAN 1
141 #define _LIBCPP_BIG_ENDIAN    0
142 #endif  // __LITTLE_ENDIAN__
143 #endif  // __LITTLE_ENDIAN__
144
145 #ifdef __BIG_ENDIAN__
146 #if __BIG_ENDIAN__
147 #define _LIBCPP_LITTLE_ENDIAN 0
148 #define _LIBCPP_BIG_ENDIAN    1
149 #endif  // __BIG_ENDIAN__
150 #endif  // __BIG_ENDIAN__
151
152 #ifdef __BYTE_ORDER__
153 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
154 #define _LIBCPP_LITTLE_ENDIAN 1
155 #define _LIBCPP_BIG_ENDIAN 0
156 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
157 #define _LIBCPP_LITTLE_ENDIAN 0
158 #define _LIBCPP_BIG_ENDIAN 1
159 #endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
160 #endif // __BYTE_ORDER__
161
162 #ifdef __FreeBSD__
163 # include <sys/endian.h>
164 #  if _BYTE_ORDER == _LITTLE_ENDIAN
165 #   define _LIBCPP_LITTLE_ENDIAN 1
166 #   define _LIBCPP_BIG_ENDIAN    0
167 # else  // _BYTE_ORDER == _LITTLE_ENDIAN
168 #   define _LIBCPP_LITTLE_ENDIAN 0
169 #   define _LIBCPP_BIG_ENDIAN    1
170 # endif  // _BYTE_ORDER == _LITTLE_ENDIAN
171 # ifndef __LONG_LONG_SUPPORTED
172 #  define _LIBCPP_HAS_NO_LONG_LONG
173 # endif  // __LONG_LONG_SUPPORTED
174 #endif  // __FreeBSD__
175
176 #ifdef __NetBSD__
177 # include <sys/endian.h>
178 #  if _BYTE_ORDER == _LITTLE_ENDIAN
179 #   define _LIBCPP_LITTLE_ENDIAN 1
180 #   define _LIBCPP_BIG_ENDIAN    0
181 # else  // _BYTE_ORDER == _LITTLE_ENDIAN
182 #   define _LIBCPP_LITTLE_ENDIAN 0
183 #   define _LIBCPP_BIG_ENDIAN    1
184 # endif  // _BYTE_ORDER == _LITTLE_ENDIAN
185 # define _LIBCPP_HAS_QUICK_EXIT
186 #endif  // __NetBSD__
187
188 #if defined(_WIN32)
189 #  define _LIBCPP_WIN32API      1
190 #  define _LIBCPP_LITTLE_ENDIAN 1
191 #  define _LIBCPP_BIG_ENDIAN    0
192 #  define _LIBCPP_SHORT_WCHAR   1
193
194 // If mingw not explicitly detected, assume using MS C runtime only.
195 #  ifndef __MINGW32__
196 #    define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
197 #  endif
198 #  if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
199 #    define _LIBCPP_HAS_BITSCAN64
200 #  endif
201 #endif // defined(_WIN32)
202
203 #ifdef __sun__
204 # include <sys/isa_defs.h>
205 # ifdef _LITTLE_ENDIAN
206 #   define _LIBCPP_LITTLE_ENDIAN 1
207 #   define _LIBCPP_BIG_ENDIAN    0
208 # else
209 #   define _LIBCPP_LITTLE_ENDIAN 0
210 #   define _LIBCPP_BIG_ENDIAN    1
211 # endif
212 #endif // __sun__
213
214 #if defined(__CloudABI__)
215   // Certain architectures provide arc4random(). Prefer using
216   // arc4random() over /dev/{u,}random to make it possible to obtain
217   // random data even when using sandboxing mechanisms such as chroots,
218   // Capsicum, etc.
219 # define _LIBCPP_USING_ARC4_RANDOM
220 #elif defined(__native_client__)
221   // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
222   // including accesses to the special files under /dev. C++11's
223   // std::random_device is instead exposed through a NaCl syscall.
224 # define _LIBCPP_USING_NACL_RANDOM
225 #elif defined(_LIBCPP_WIN32API)
226 # define _LIBCPP_USING_WIN32_RANDOM
227 #else
228 # define _LIBCPP_USING_DEV_RANDOM
229 #endif
230
231 #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
232 # include <endian.h>
233 # if __BYTE_ORDER == __LITTLE_ENDIAN
234 #  define _LIBCPP_LITTLE_ENDIAN 1
235 #  define _LIBCPP_BIG_ENDIAN    0
236 # elif __BYTE_ORDER == __BIG_ENDIAN
237 #  define _LIBCPP_LITTLE_ENDIAN 0
238 #  define _LIBCPP_BIG_ENDIAN    1
239 # else  // __BYTE_ORDER == __BIG_ENDIAN
240 #  error unable to determine endian
241 # endif
242 #endif  // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
243
244 #if __has_attribute(__no_sanitize__)
245 #define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
246 #else
247 #define _LIBCPP_NO_CFI
248 #endif
249
250 #if defined(_LIBCPP_COMPILER_CLANG)
251
252 // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
253 // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility.
254 #if (defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) &&       \
255      !defined(__arm__)) ||                                                     \
256     defined(_LIBCPP_ALTERNATE_STRING_LAYOUT)
257 #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
258 #endif
259
260 #if __has_feature(cxx_alignas)
261 #  define _ALIGNAS_TYPE(x) alignas(x)
262 #  define _ALIGNAS(x) alignas(x)
263 #else
264 #  define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
265 #  define _ALIGNAS(x) __attribute__((__aligned__(x)))
266 #endif
267
268 #if __cplusplus < 201103L
269 typedef __char16_t char16_t;
270 typedef __char32_t char32_t;
271 #endif
272
273 #if !(__has_feature(cxx_exceptions)) && !defined(_LIBCPP_NO_EXCEPTIONS)
274 #define _LIBCPP_NO_EXCEPTIONS
275 #endif
276
277 #if !(__has_feature(cxx_rtti))
278 #define _LIBCPP_NO_RTTI
279 #endif
280
281 #if !(__has_feature(cxx_strong_enums))
282 #define _LIBCPP_HAS_NO_STRONG_ENUMS
283 #endif
284
285 #if !(__has_feature(cxx_decltype))
286 #define _LIBCPP_HAS_NO_DECLTYPE
287 #endif
288
289 #if __has_feature(cxx_attributes)
290 #  define _LIBCPP_NORETURN [[noreturn]]
291 #else
292 #  define _LIBCPP_NORETURN __attribute__ ((noreturn))
293 #endif
294
295 #if !(__has_feature(cxx_lambdas))
296 #define _LIBCPP_HAS_NO_LAMBDAS
297 #endif
298
299 #if !(__has_feature(cxx_nullptr))
300 # if __has_extension(cxx_nullptr) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR)
301 #   define nullptr __nullptr
302 # else
303 #   define _LIBCPP_HAS_NO_NULLPTR
304 # endif
305 #endif
306
307 #if !(__has_feature(cxx_rvalue_references))
308 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
309 #endif
310
311 #if !(__has_feature(cxx_auto_type))
312 #define _LIBCPP_HAS_NO_AUTO_TYPE
313 #endif
314
315 #if !(__has_feature(cxx_variadic_templates))
316 #define _LIBCPP_HAS_NO_VARIADICS
317 #endif
318
319 #if !(__has_feature(cxx_generalized_initializers))
320 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
321 #endif
322
323 #if __has_feature(is_base_of)
324 #  define _LIBCPP_HAS_IS_BASE_OF
325 #endif
326
327 #if __has_feature(is_final)
328 #  define _LIBCPP_HAS_IS_FINAL
329 #endif
330
331 // Objective-C++ features (opt-in)
332 #if __has_feature(objc_arc)
333 #define _LIBCPP_HAS_OBJC_ARC
334 #endif
335
336 #if __has_feature(objc_arc_weak)
337 #define _LIBCPP_HAS_OBJC_ARC_WEAK
338 #define _LIBCPP_HAS_NO_STRONG_ENUMS
339 #endif
340
341 #if !(__has_feature(cxx_constexpr))
342 #define _LIBCPP_HAS_NO_CONSTEXPR
343 #endif
344
345 #if !(__has_feature(cxx_relaxed_constexpr))
346 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
347 #endif
348
349 #if !(__has_feature(cxx_variable_templates))
350 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
351 #endif
352
353 #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
354 #if defined(__FreeBSD__)
355 #define _LIBCPP_HAS_QUICK_EXIT
356 #define _LIBCPP_HAS_C11_FEATURES
357 #elif defined(__Fuchsia__)
358 #define _LIBCPP_HAS_QUICK_EXIT
359 #define _LIBCPP_HAS_C11_FEATURES
360 #elif defined(__linux__)
361 #if !defined(_LIBCPP_HAS_MUSL_LIBC)
362 #if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
363 #define _LIBCPP_HAS_QUICK_EXIT
364 #endif
365 #if __GLIBC_PREREQ(2, 17)
366 #define _LIBCPP_HAS_C11_FEATURES
367 #endif
368 #else // defined(_LIBCPP_HAS_MUSL_LIBC)
369 #define _LIBCPP_HAS_QUICK_EXIT
370 #define _LIBCPP_HAS_C11_FEATURES
371 #endif
372 #endif // __linux__
373 #endif
374
375 #if !(__has_feature(cxx_noexcept))
376 #define _LIBCPP_HAS_NO_NOEXCEPT
377 #endif
378
379 #if __has_feature(underlying_type)
380 #  define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
381 #endif
382
383 #if __has_feature(is_literal)
384 #  define _LIBCPP_IS_LITERAL(T) __is_literal(T)
385 #endif
386
387 // Inline namespaces are available in Clang regardless of C++ dialect.
388 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
389 #define _LIBCPP_END_NAMESPACE_STD  } }
390 #define _VSTD std::_LIBCPP_NAMESPACE
391
392 namespace std {
393   inline namespace _LIBCPP_NAMESPACE {
394   }
395 }
396
397 #if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
398 #define _LIBCPP_HAS_NO_ASAN
399 #endif
400
401 // Allow for build-time disabling of unsigned integer sanitization
402 #if !defined(_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK) && __has_attribute(no_sanitize)
403 #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
404 #endif 
405
406 // A constexpr version of __builtin_memcmp was added in clang 4.0
407 #if __has_builtin(__builtin_memcmp)
408 # ifdef __apple_build_version__
409 // No shipping version of Apple's clang has constexpr __builtin_memcmp
410 # elif __clang_major__ > 3
411 #  define _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR
412 # endif
413 #endif
414
415 #elif defined(_LIBCPP_COMPILER_GCC)
416
417 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
418 #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
419
420 #define _LIBCPP_NORETURN __attribute__((noreturn))
421
422 #if _GNUC_VER >= 407
423 #define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
424 #define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
425 #define _LIBCPP_HAS_IS_FINAL
426 #endif
427
428 #if defined(__GNUC__) && _GNUC_VER >= 403
429 #  define _LIBCPP_HAS_IS_BASE_OF
430 #endif
431
432 #if !__EXCEPTIONS
433 #define _LIBCPP_NO_EXCEPTIONS
434 #endif
435
436 // constexpr was added to GCC in 4.6.
437 #if _GNUC_VER < 406
438 #define _LIBCPP_HAS_NO_CONSTEXPR
439 // Can only use constexpr in c++11 mode.
440 #elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
441 #define _LIBCPP_HAS_NO_CONSTEXPR
442 #endif
443
444 // Determine if GCC supports relaxed constexpr
445 #if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L
446 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
447 #endif
448
449 // GCC 5 will support variable templates
450 #if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L
451 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
452 #endif
453
454 #ifndef __GXX_EXPERIMENTAL_CXX0X__
455 #define _LIBCPP_HAS_NO_DECLTYPE
456 #define _LIBCPP_HAS_NO_NULLPTR
457 #define _LIBCPP_HAS_NO_UNICODE_CHARS
458 #define _LIBCPP_HAS_NO_VARIADICS
459 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
460 #define _LIBCPP_HAS_NO_STRONG_ENUMS
461 #define _LIBCPP_HAS_NO_NOEXCEPT
462
463 #else  // __GXX_EXPERIMENTAL_CXX0X__
464
465 #if _GNUC_VER < 403
466 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
467 #endif
468
469
470 #if _GNUC_VER < 404
471 #define _LIBCPP_HAS_NO_DECLTYPE
472 #define _LIBCPP_HAS_NO_UNICODE_CHARS
473 #define _LIBCPP_HAS_NO_VARIADICS
474 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
475 #endif  // _GNUC_VER < 404
476
477 #if _GNUC_VER < 406
478 #define _LIBCPP_HAS_NO_NOEXCEPT
479 #define _LIBCPP_HAS_NO_NULLPTR
480 #endif
481
482 #endif  // __GXX_EXPERIMENTAL_CXX0X__
483
484 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
485 #define _LIBCPP_END_NAMESPACE_STD  } }
486 #define _VSTD std::_LIBCPP_NAMESPACE
487
488 namespace std {
489 namespace _LIBCPP_NAMESPACE {
490 }
491 using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
492 }
493
494 #if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
495 #define _LIBCPP_HAS_NO_ASAN
496 #endif
497
498 #elif defined(_LIBCPP_COMPILER_MSVC)
499
500 #define _LIBCPP_TOSTRING2(x) #x
501 #define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
502 #define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
503
504 #if _MSC_VER < 1900
505 #error "MSVC versions prior to Visual Studio 2015 are not supported"
506 #endif
507
508 #define _LIBCPP_HAS_IS_BASE_OF
509 #define _LIBCPP_HAS_NO_CONSTEXPR
510 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
511 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
512 #if _MSC_VER <= 1800
513 #define _LIBCPP_HAS_NO_UNICODE_CHARS
514 #endif
515 #define _LIBCPP_HAS_NO_NOEXCEPT
516 #define __alignof__ __alignof
517 #define _LIBCPP_NORETURN __declspec(noreturn)
518 #define _ALIGNAS(x) __declspec(align(x))
519 #define _LIBCPP_HAS_NO_VARIADICS
520
521 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
522 #define _LIBCPP_END_NAMESPACE_STD  }
523 #define _VSTD std
524
525 #  define _LIBCPP_WEAK
526 namespace std {
527 }
528
529 #define _LIBCPP_HAS_NO_ASAN
530
531 #elif defined(_LIBCPP_COMPILER_IBM)
532
533 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
534 #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
535 #define _ATTRIBUTE(x) __attribute__((x))
536 #define _LIBCPP_NORETURN __attribute__((noreturn))
537
538 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
539 #define _LIBCPP_HAS_NO_NOEXCEPT
540 #define _LIBCPP_HAS_NO_NULLPTR
541 #define _LIBCPP_HAS_NO_UNICODE_CHARS
542 #define _LIBCPP_HAS_IS_BASE_OF
543 #define _LIBCPP_HAS_IS_FINAL
544 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
545
546 #if defined(_AIX)
547 #define __MULTILOCALE_API
548 #endif
549
550 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
551 #define _LIBCPP_END_NAMESPACE_STD  } }
552 #define _VSTD std::_LIBCPP_NAMESPACE
553
554 namespace std {
555   inline namespace _LIBCPP_NAMESPACE {
556   }
557 }
558
559 #define _LIBCPP_HAS_NO_ASAN
560
561 #endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
562
563 #if defined(__ELF__)
564 #define _LIBCPP_OBJECT_FORMAT_ELF   1
565 #elif defined(__MACH__)
566 #define _LIBCPP_OBJECT_FORMAT_MACHO 1
567 #else
568 #define _LIBCPP_OBJECT_FORMAT_COFF  1
569 #endif
570
571 #if defined(_LIBCPP_OBJECT_FORMAT_COFF)
572 #if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
573 # define _LIBCPP_DLL_VIS
574 # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
575 # define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
576 # define _LIBCPP_OVERRIDABLE_FUNC_VIS
577 #elif defined(_LIBCPP_BUILDING_LIBRARY)
578 # define _LIBCPP_DLL_VIS __declspec(dllexport)
579 # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
580 # define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS
581 # define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS
582 #else
583 # define _LIBCPP_DLL_VIS __declspec(dllimport)
584 # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
585 # define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
586 # define _LIBCPP_OVERRIDABLE_FUNC_VIS
587 #endif
588
589 #define _LIBCPP_TYPE_VIS            _LIBCPP_DLL_VIS
590 #define _LIBCPP_FUNC_VIS            _LIBCPP_DLL_VIS
591 #define _LIBCPP_EXCEPTION_ABI       _LIBCPP_DLL_VIS
592 #define _LIBCPP_HIDDEN
593 #define _LIBCPP_TEMPLATE_VIS
594 #define _LIBCPP_FUNC_VIS_ONLY
595 #define _LIBCPP_ENUM_VIS
596
597 #if defined(_LIBCPP_COMPILER_MSVC)
598 # define _LIBCPP_INLINE_VISIBILITY __forceinline
599 # define _LIBCPP_ALWAYS_INLINE     __forceinline
600 # define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline
601 #else
602 # define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
603 # define _LIBCPP_ALWAYS_INLINE     __attribute__ ((__always_inline__))
604 # define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__ ((__always_inline__))
605 #endif
606 #endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
607
608 #ifndef _LIBCPP_HIDDEN
609 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
610 #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
611 #else
612 #define _LIBCPP_HIDDEN
613 #endif
614 #endif
615
616 #ifndef _LIBCPP_FUNC_VIS
617 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
618 #define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default")))
619 #else
620 #define _LIBCPP_FUNC_VIS
621 #endif
622 #endif
623
624 #ifndef _LIBCPP_TYPE_VIS
625 #  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
626 #    if __has_attribute(__type_visibility__)
627 #      define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
628 #    else
629 #      define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
630 #    endif
631 #  else
632 #    define _LIBCPP_TYPE_VIS
633 #  endif
634 #endif
635
636 #ifndef _LIBCPP_TEMPLATE_VIS
637 # define _LIBCPP_TEMPLATE_VIS _LIBCPP_TYPE_VIS
638 #endif
639
640 #ifndef _LIBCPP_FUNC_VIS_ONLY
641 # define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
642 #endif
643
644 #ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
645 # define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_FUNC_VIS
646 #endif
647
648 #ifndef _LIBCPP_EXCEPTION_ABI
649 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
650 #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
651 #else
652 #define _LIBCPP_EXCEPTION_ABI
653 #endif
654 #endif
655
656 #ifndef _LIBCPP_ENUM_VIS
657 #  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
658 #    define _LIBCPP_ENUM_VIS __attribute__ ((__type_visibility__("default")))
659 #  else
660 #    define _LIBCPP_ENUM_VIS
661 #  endif
662 #endif
663
664 #ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
665 #  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
666 #    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__ ((__type_visibility__("default")))
667 #  else
668 #    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
669 #  endif
670 #endif
671
672 #ifndef _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
673 #  define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
674 #endif
675
676 #ifndef _LIBCPP_INLINE_VISIBILITY
677 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
678 #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
679 #else
680 #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
681 #endif
682 #endif
683
684 #ifndef _LIBCPP_ALWAYS_INLINE
685 #if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
686 #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__visibility__("hidden"), __always_inline__))
687 #else
688 #define _LIBCPP_ALWAYS_INLINE  __attribute__ ((__always_inline__))
689 #endif
690 #endif
691
692 #ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
693 # if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
694 #  define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__visibility__("default"), __always_inline__))
695 # else
696 #  define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__always_inline__))
697 # endif
698 #endif
699
700 #ifndef _LIBCPP_PREFERRED_OVERLOAD
701 #  if __has_attribute(__enable_if__)
702 #    define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, "")))
703 #  endif
704 #endif
705
706 #ifndef _LIBCPP_HAS_NO_NOEXCEPT
707 #  define _NOEXCEPT noexcept
708 #  define _NOEXCEPT_(x) noexcept(x)
709 #else
710 #  define _NOEXCEPT throw()
711 #  define _NOEXCEPT_(x)
712 #endif
713
714 #if defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
715 # if !defined(_LIBCPP_DEBUG)
716 #   error cannot use _LIBCPP_DEBUG_USE_EXCEPTIONS unless _LIBCPP_DEBUG is defined
717 # endif
718 # define _NOEXCEPT_DEBUG noexcept(false)
719 # define _NOEXCEPT_DEBUG_(x) noexcept(false)
720 #else
721 # define _NOEXCEPT_DEBUG _NOEXCEPT
722 # define _NOEXCEPT_DEBUG_(x) _NOEXCEPT_(x)
723 #endif
724
725 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
726 typedef unsigned short char16_t;
727 typedef unsigned int   char32_t;
728 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
729
730 #ifndef __SIZEOF_INT128__
731 #define _LIBCPP_HAS_NO_INT128
732 #endif
733
734 #ifdef _LIBCPP_CXX03_LANG
735 # if __has_extension(c_static_assert)
736 #   define static_assert(__b, __m) _Static_assert(__b, __m)
737 # else
738 extern "C++" {
739 template <bool> struct __static_assert_test;
740 template <> struct __static_assert_test<true> {};
741 template <unsigned> struct __static_assert_check {};
742 }
743 #define static_assert(__b, __m) \
744     typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \
745     _LIBCPP_CONCAT(__t, __LINE__)
746 # endif // __has_extension(c_static_assert)
747 #endif  // _LIBCPP_CXX03_LANG
748
749 #ifdef _LIBCPP_HAS_NO_DECLTYPE
750 // GCC 4.6 provides __decltype in all standard modes.
751 #if !__is_identifier(__decltype) || _LIBCPP_CLANG_VER >= 304 || _GNUC_VER >= 406
752 #  define decltype(__x) __decltype(__x)
753 #else
754 #  define decltype(__x) __typeof__(__x)
755 #endif
756 #endif
757
758 #ifdef _LIBCPP_HAS_NO_CONSTEXPR
759 #define _LIBCPP_CONSTEXPR
760 #else
761 #define _LIBCPP_CONSTEXPR constexpr
762 #endif
763
764 #ifdef _LIBCPP_CXX03_LANG
765 #define _LIBCPP_DEFAULT {}
766 #else
767 #define _LIBCPP_DEFAULT = default;
768 #endif
769
770 #ifdef _LIBCPP_CXX03_LANG
771 #define _LIBCPP_EQUAL_DELETE
772 #else
773 #define _LIBCPP_EQUAL_DELETE = delete
774 #endif
775
776 #ifdef __GNUC__
777 #define _NOALIAS __attribute__((__malloc__))
778 #else
779 #define _NOALIAS
780 #endif
781
782 #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \
783     (!defined(_LIBCPP_CXX03_LANG) && defined(__GNUC__)) // All supported GCC versions
784 #   define _LIBCPP_EXPLICIT explicit
785 #else
786 #   define _LIBCPP_EXPLICIT
787 #endif
788
789 #if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete)
790 #   define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
791 #endif
792
793 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
794 #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
795 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
796     __lx __v_; \
797     _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \
798     _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \
799     _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
800     };
801 #else  // _LIBCPP_HAS_NO_STRONG_ENUMS
802 #define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x
803 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
804 #endif  // _LIBCPP_HAS_NO_STRONG_ENUMS
805
806 #ifdef _LIBCPP_DEBUG
807 #   if _LIBCPP_DEBUG == 0
808 #       define _LIBCPP_DEBUG_LEVEL 1
809 #   elif _LIBCPP_DEBUG == 1
810 #       define _LIBCPP_DEBUG_LEVEL 2
811 #   else
812 #       error Supported values for _LIBCPP_DEBUG are 0 and 1
813 #   endif
814 #   define _LIBCPP_EXTERN_TEMPLATE(...)
815 #endif
816
817 #ifndef _LIBCPP_EXTERN_TEMPLATE
818 #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
819 #endif
820
821 #ifndef _LIBCPP_EXTERN_TEMPLATE2
822 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
823 #endif
824
825 #if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
826 #define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
827 #endif
828
829 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT) ||   \
830     defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__)
831 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
832 #endif
833
834 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
835 // Most unix variants have catopen.  These are the specific ones that don't.
836 #if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
837 #define _LIBCPP_HAS_CATOPEN 1
838 #endif
839 #endif
840
841 #ifdef __FreeBSD__
842 #define _DECLARE_C99_LDBL_MATH 1
843 #endif
844
845 #if defined(__APPLE__)
846 # if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
847      defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
848 #   define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
849 # endif
850 # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
851 #   if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
852 #     define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
853 #   endif
854 # endif
855 #endif // defined(__APPLE__)
856
857 #if defined(__APPLE__) || defined(__FreeBSD__)
858 #define _LIBCPP_HAS_DEFAULTRUNELOCALE
859 #endif
860
861 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
862 #define _LIBCPP_WCTYPE_IS_MASK
863 #endif
864
865 #ifndef _LIBCPP_STD_VER
866 #  if  __cplusplus <= 201103L
867 #    define _LIBCPP_STD_VER 11
868 #  elif __cplusplus <= 201402L
869 #    define _LIBCPP_STD_VER 14
870 #  else
871 #    define _LIBCPP_STD_VER 16  // current year, or date of c++17 ratification
872 #  endif
873 #endif  // _LIBCPP_STD_VER
874
875 #if _LIBCPP_STD_VER > 11
876 #define _LIBCPP_DEPRECATED [[deprecated]]
877 #else
878 #define _LIBCPP_DEPRECATED
879 #endif
880
881 #if _LIBCPP_STD_VER <= 11
882 #define _LIBCPP_EXPLICIT_AFTER_CXX11
883 #define _LIBCPP_DEPRECATED_AFTER_CXX11
884 #else
885 #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
886 #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
887 #endif
888
889 #if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
890 #define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
891 #else
892 #define _LIBCPP_CONSTEXPR_AFTER_CXX11
893 #endif
894
895 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
896 #define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr
897 #else
898 #define _LIBCPP_CONSTEXPR_AFTER_CXX14
899 #endif
900
901 // FIXME: Remove all usages of this macro once compilers catch up.
902 #if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L)
903 # define _LIBCPP_HAS_NO_INLINE_VARIABLES
904 #endif
905
906 #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
907 #  define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x)
908 #else
909 #  define _LIBCPP_EXPLICIT_MOVE(x) (x)
910 #endif
911
912 #ifndef _LIBCPP_HAS_NO_ASAN
913 _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
914   const void *, const void *, const void *, const void *);
915 #endif
916
917 // Try to find out if RTTI is disabled.
918 // g++ and cl.exe have RTTI on by default and define a macro when it is.
919 // g++ only defines the macro in 4.3.2 and onwards.
920 #if !defined(_LIBCPP_NO_RTTI)
921 #  if defined(__GNUC__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \
922    (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI)
923 #    define _LIBCPP_NO_RTTI
924 #  elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
925 #    define _LIBCPP_NO_RTTI
926 #  endif
927 #endif
928
929 #ifndef _LIBCPP_WEAK
930 #  define _LIBCPP_WEAK __attribute__((__weak__))
931 #endif
932
933 // Thread API
934 #if !defined(_LIBCPP_HAS_NO_THREADS) && \
935     !defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
936 # if defined(__FreeBSD__) || \
937     defined(__Fuchsia__) || \
938     defined(__NetBSD__) || \
939     defined(__linux__) || \
940     defined(__APPLE__) || \
941     defined(__CloudABI__) || \
942     defined(__sun__)
943 #   define _LIBCPP_HAS_THREAD_API_PTHREAD
944 # elif defined(_LIBCPP_WIN32API)
945 #  define _LIBCPP_HAS_THREAD_API_WIN32
946 # else
947 #  error "No thread API"
948 # endif // _LIBCPP_HAS_THREAD_API
949 #endif // _LIBCPP_HAS_NO_THREADS
950
951 #if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
952 #  error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \
953          _LIBCPP_HAS_NO_THREADS is not defined.
954 #endif
955
956 #if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
957 #  error _LIBCPP_HAS_EXTERNAL_THREAD_API may not be defined when \
958          _LIBCPP_HAS_NO_THREADS is defined.
959 #endif
960
961 #if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
962 #  error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
963          _LIBCPP_HAS_NO_THREADS is defined.
964 #endif
965
966 // Systems that use capability-based security (FreeBSD with Capsicum,
967 // Nuxi CloudABI) may only provide local filesystem access (using *at()).
968 // Functions like open(), rename(), unlink() and stat() should not be
969 // used, as they attempt to access the global filesystem namespace.
970 #ifdef __CloudABI__
971 #define _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
972 #endif
973
974 // CloudABI is intended for running networked services. Processes do not
975 // have standard input and output channels.
976 #ifdef __CloudABI__
977 #define _LIBCPP_HAS_NO_STDIN
978 #define _LIBCPP_HAS_NO_STDOUT
979 #endif
980
981 #if defined(__BIONIC__) || defined(__CloudABI__) ||                            \
982     defined(_LIBCPP_HAS_MUSL_LIBC)
983 #define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
984 #endif
985
986 // Thread-unsafe functions such as strtok() and localtime()
987 // are not available.
988 #ifdef __CloudABI__
989 #define _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS
990 #endif
991
992 #if __has_feature(cxx_atomic) || __has_extension(c_atomic)
993 #define _LIBCPP_HAS_C_ATOMIC_IMP
994 #elif _GNUC_VER > 407
995 #define _LIBCPP_HAS_GCC_ATOMIC_IMP
996 #endif
997
998 #if (!defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)) \
999      || defined(_LIBCPP_HAS_NO_THREADS)
1000 #define _LIBCPP_HAS_NO_ATOMIC_HEADER
1001 #endif
1002
1003 #ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
1004 #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
1005 #endif
1006
1007 #if (defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) && defined(__clang__) \
1008       && __has_attribute(acquire_capability))
1009 #define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
1010 #endif
1011
1012 #if __has_attribute(require_constant_initialization)
1013 #define _LIBCPP_SAFE_STATIC __attribute__((__require_constant_initialization__))
1014 #else
1015 #define _LIBCPP_SAFE_STATIC
1016 #endif
1017
1018 #if !__has_builtin(__builtin_addressof) && _GNUC_VER < 700
1019 #define _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
1020 #endif
1021
1022 #if !defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
1023 #if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
1024 #define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
1025 #endif
1026 #endif
1027
1028 #endif // __cplusplus
1029
1030 #endif // _LIBCPP_CONFIG