2 //===--------------------------- __config ---------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef _LIBCPP_CONFIG
12 #define _LIBCPP_CONFIG
14 #if !defined(_MSC_VER) || defined(__clang__)
15 #pragma GCC system_header
19 #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
22 #define _LIBCPP_VERSION 1101
24 #define _LIBCPP_ABI_VERSION 1
26 #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y
27 #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y)
29 #define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION)
31 #ifdef __LITTLE_ENDIAN__
33 #define _LIBCPP_LITTLE_ENDIAN 1
34 #define _LIBCPP_BIG_ENDIAN 0
35 #endif // __LITTLE_ENDIAN__
36 #endif // __LITTLE_ENDIAN__
40 #define _LIBCPP_LITTLE_ENDIAN 0
41 #define _LIBCPP_BIG_ENDIAN 1
42 #endif // __BIG_ENDIAN__
43 #endif // __BIG_ENDIAN__
46 # include <sys/endian.h>
47 # if _BYTE_ORDER == _LITTLE_ENDIAN
48 # define _LIBCPP_LITTLE_ENDIAN 1
49 # define _LIBCPP_BIG_ENDIAN 0
50 # else // _BYTE_ORDER == _LITTLE_ENDIAN
51 # define _LIBCPP_LITTLE_ENDIAN 0
52 # define _LIBCPP_BIG_ENDIAN 1
53 # endif // _BYTE_ORDER == _LITTLE_ENDIAN
54 # ifndef __LONG_LONG_SUPPORTED
55 # define _LIBCPP_HAS_NO_LONG_LONG
56 # endif // __LONG_LONG_SUPPORTED
60 # include <sys/endian.h>
61 # if _BYTE_ORDER == _LITTLE_ENDIAN
62 # define _LIBCPP_LITTLE_ENDIAN 1
63 # define _LIBCPP_BIG_ENDIAN 0
64 # else // _BYTE_ORDER == _LITTLE_ENDIAN
65 # define _LIBCPP_LITTLE_ENDIAN 0
66 # define _LIBCPP_BIG_ENDIAN 1
67 # endif // _BYTE_ORDER == _LITTLE_ENDIAN
68 # define _LIBCPP_HAS_QUICK_EXIT
72 # define _LIBCPP_LITTLE_ENDIAN 1
73 # define _LIBCPP_BIG_ENDIAN 0
74 // Compiler intrinsics (GCC or MSVC)
75 # if defined(__clang__) \
76 || (defined(_MSC_VER) && _MSC_VER >= 1400) \
77 || (defined(__GNUC__) && _GNUC_VER > 403)
78 # define _LIBCPP_HAS_IS_BASE_OF
80 # if defined(_MSC_VER) && !defined(__clang__)
81 # define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler
82 # define _LIBCPP_TOSTRING2(x) #x
83 # define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
84 # define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
86 # // If mingw not explicitly detected, assume using MS C runtime only.
88 # define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
93 # if defined(__GNUC__) && _GNUC_VER >= 403
94 # define _LIBCPP_HAS_IS_BASE_OF
99 # include <sys/isa_defs.h>
100 # ifdef _LITTLE_ENDIAN
101 # define _LIBCPP_LITTLE_ENDIAN 1
102 # define _LIBCPP_BIG_ENDIAN 0
104 # define _LIBCPP_LITTLE_ENDIAN 0
105 # define _LIBCPP_BIG_ENDIAN 1
109 #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
111 # if __BYTE_ORDER == __LITTLE_ENDIAN
112 # define _LIBCPP_LITTLE_ENDIAN 1
113 # define _LIBCPP_BIG_ENDIAN 0
114 # elif __BYTE_ORDER == __BIG_ENDIAN
115 # define _LIBCPP_LITTLE_ENDIAN 0
116 # define _LIBCPP_BIG_ENDIAN 1
117 # else // __BYTE_ORDER == __BIG_ENDIAN
118 # error unable to determine endian
120 #endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
124 // only really useful for a DLL
125 #ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
127 # define _LIBCPP_HIDDEN
128 # define _LIBCPP_FUNC_VIS __declspec(dllexport)
129 # define _LIBCPP_TYPE_VIS __declspec(dllexport)
131 # define _LIBCPP_HIDDEN
132 # define _LIBCPP_FUNC_VIS __declspec(dllimport)
133 # define _LIBCPP_TYPE_VIS __declspec(dllimport)
136 # define _LIBCPP_HIDDEN
137 # define _LIBCPP_FUNC_VIS
138 # define _LIBCPP_TYPE_VIS
141 #define _LIBCPP_TYPE_VIS_ONLY
142 #define _LIBCPP_FUNC_VIS_ONLY
144 #ifndef _LIBCPP_INLINE_VISIBILITY
146 # define _LIBCPP_INLINE_VISIBILITY __forceinline
147 # else // MinGW GCC and Clang
148 # define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
152 #ifndef _LIBCPP_EXCEPTION_ABI
153 #define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS
156 #ifndef _LIBCPP_ALWAYS_INLINE
158 # define _LIBCPP_ALWAYS_INLINE __forceinline
164 #ifndef __has_attribute
165 #define __has_attribute(__x) 0
168 #ifndef _LIBCPP_HIDDEN
169 #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
172 #ifndef _LIBCPP_FUNC_VIS
173 #define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default")))
176 #ifndef _LIBCPP_TYPE_VIS
177 # if __has_attribute(__type_visibility__)
178 # define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default")))
180 # define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default")))
184 #ifndef _LIBCPP_TYPE_VIS_ONLY
185 # define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
188 #ifndef _LIBCPP_FUNC_VIS_ONLY
189 # define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
192 #ifndef _LIBCPP_INLINE_VISIBILITY
193 #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
196 #ifndef _LIBCPP_EXCEPTION_ABI
197 #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default")))
200 #ifndef _LIBCPP_ALWAYS_INLINE
201 #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
204 #if defined(__clang__)
206 #if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \
208 #define _LIBCPP_ALTERNATE_STRING_LAYOUT
211 #if __has_feature(cxx_alignas)
212 # define _ALIGNAS_TYPE(x) alignas(x)
213 # define _ALIGNAS(x) alignas(x)
215 # define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
216 # define _ALIGNAS(x) __attribute__((__aligned__(x)))
219 #if !__has_feature(cxx_alias_templates)
220 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
223 #if __cplusplus < 201103L
225 #define _LIBCPP_HAS_NO_UNICODE_CHARS
227 typedef __char16_t char16_t;
228 typedef __char32_t char32_t;
232 #if !(__has_feature(cxx_exceptions))
233 #define _LIBCPP_NO_EXCEPTIONS
236 #if !(__has_feature(cxx_rtti))
237 #define _LIBCPP_NO_RTTI
240 #if !(__has_feature(cxx_strong_enums))
241 #define _LIBCPP_HAS_NO_STRONG_ENUMS
244 #if !(__has_feature(cxx_decltype))
245 #define _LIBCPP_HAS_NO_DECLTYPE
248 #if __has_feature(cxx_attributes)
249 # define _LIBCPP_NORETURN [[noreturn]]
251 # define _LIBCPP_NORETURN __attribute__ ((noreturn))
254 #if !(__has_feature(cxx_defaulted_functions))
255 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
256 #endif // !(__has_feature(cxx_defaulted_functions))
258 #if !(__has_feature(cxx_deleted_functions))
259 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
260 #endif // !(__has_feature(cxx_deleted_functions))
262 #if !(__has_feature(cxx_lambdas))
263 #define _LIBCPP_HAS_NO_LAMBDAS
266 #if !(__has_feature(cxx_nullptr))
267 #define _LIBCPP_HAS_NO_NULLPTR
270 #if !(__has_feature(cxx_rvalue_references))
271 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
274 #if !(__has_feature(cxx_static_assert))
275 #define _LIBCPP_HAS_NO_STATIC_ASSERT
278 #if !(__has_feature(cxx_auto_type))
279 #define _LIBCPP_HAS_NO_AUTO_TYPE
282 #if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return)
283 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
286 #if !(__has_feature(cxx_variadic_templates))
287 #define _LIBCPP_HAS_NO_VARIADICS
290 #if !(__has_feature(cxx_trailing_return))
291 #define _LIBCPP_HAS_NO_TRAILING_RETURN
294 #if !(__has_feature(cxx_generalized_initializers))
295 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
298 #if __has_feature(is_base_of)
299 # define _LIBCPP_HAS_IS_BASE_OF
302 // Objective-C++ features (opt-in)
303 #if __has_feature(objc_arc)
304 #define _LIBCPP_HAS_OBJC_ARC
307 #if __has_feature(objc_arc_weak)
308 #define _LIBCPP_HAS_OBJC_ARC_WEAK
309 #define _LIBCPP_HAS_NO_STRONG_ENUMS
312 #if !(__has_feature(cxx_constexpr))
313 #define _LIBCPP_HAS_NO_CONSTEXPR
316 #if !(__has_feature(cxx_relaxed_constexpr))
317 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
320 #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
321 #if defined(__FreeBSD__)
322 #define _LIBCPP_HAS_QUICK_EXIT
323 #define _LIBCPP_HAS_C11_FEATURES
324 #elif defined(__ANDROID__)
325 #define _LIBCPP_HAS_QUICK_EXIT
326 #elif defined(__linux__)
327 #include <features.h>
328 #if __GLIBC_PREREQ(2, 15)
329 #define _LIBCPP_HAS_QUICK_EXIT
331 #if __GLIBC_PREREQ(2, 17)
332 #define _LIBCPP_HAS_C11_FEATURES
337 #if (__has_feature(cxx_noexcept))
338 # define _NOEXCEPT noexcept
339 # define _NOEXCEPT_(x) noexcept(x)
340 # define _NOEXCEPT_OR_FALSE(x) noexcept(x)
342 # define _NOEXCEPT throw()
343 # define _NOEXCEPT_(x)
344 # define _NOEXCEPT_OR_FALSE(x) false
347 #if __has_feature(underlying_type)
348 # define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
351 #if __has_feature(is_literal)
352 # define _LIBCPP_IS_LITERAL(T) __is_literal(T)
355 // Inline namespaces are available in Clang regardless of C++ dialect.
356 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
357 #define _LIBCPP_END_NAMESPACE_STD } }
358 #define _VSTD std::_LIBCPP_NAMESPACE
361 inline namespace _LIBCPP_NAMESPACE {
365 #if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
366 #define _LIBCPP_HAS_NO_ASAN
369 #elif defined(__GNUC__)
371 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
372 #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
374 #define _LIBCPP_NORETURN __attribute__((noreturn))
377 #define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
378 #define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
382 #define _LIBCPP_NO_EXCEPTIONS
385 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
387 // constexpr was added to GCC in 4.6.
389 #define _LIBCPP_HAS_NO_CONSTEXPR
390 // Can only use constexpr in c++11 mode.
391 #elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
392 #define _LIBCPP_HAS_NO_CONSTEXPR
395 // No version of GCC supports relaxed constexpr rules
396 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
398 #define _NOEXCEPT throw()
399 #define _NOEXCEPT_(x)
400 #define _NOEXCEPT_OR_FALSE(x) false
402 #ifndef __GXX_EXPERIMENTAL_CXX0X__
404 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
405 #define _LIBCPP_HAS_NO_DECLTYPE
406 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
407 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
408 #define _LIBCPP_HAS_NO_NULLPTR
409 #define _LIBCPP_HAS_NO_STATIC_ASSERT
410 #define _LIBCPP_HAS_NO_UNICODE_CHARS
411 #define _LIBCPP_HAS_NO_VARIADICS
412 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
413 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
414 #define _LIBCPP_HAS_NO_STRONG_ENUMS
416 #else // __GXX_EXPERIMENTAL_CXX0X__
418 #define _LIBCPP_HAS_NO_TRAILING_RETURN
419 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
422 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
426 #define _LIBCPP_HAS_NO_STATIC_ASSERT
430 #define _LIBCPP_HAS_NO_DECLTYPE
431 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
432 #define _LIBCPP_HAS_NO_UNICODE_CHARS
433 #define _LIBCPP_HAS_NO_VARIADICS
434 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
435 #endif // _GNUC_VER < 404
438 #define _LIBCPP_HAS_NO_NULLPTR
442 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
443 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
446 #endif // __GXX_EXPERIMENTAL_CXX0X__
448 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
449 #define _LIBCPP_END_NAMESPACE_STD } }
450 #define _VSTD std::_LIBCPP_NAMESPACE
453 namespace _LIBCPP_NAMESPACE {
455 using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
458 #if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
459 #define _LIBCPP_HAS_NO_ASAN
462 #elif defined(_LIBCPP_MSVC)
464 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
465 #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
466 #define _LIBCPP_HAS_NO_CONSTEXPR
467 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
468 #define _LIBCPP_HAS_NO_UNICODE_CHARS
469 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
470 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
471 #define __alignof__ __alignof
472 #define _LIBCPP_NORETURN __declspec(noreturn)
473 #define _ALIGNAS(x) __declspec(align(x))
474 #define _LIBCPP_HAS_NO_VARIADICS
476 #define _NOEXCEPT throw ()
477 #define _NOEXCEPT_(x)
478 #define _NOEXCEPT_OR_FALSE(x) false
480 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
481 #define _LIBCPP_END_NAMESPACE_STD }
484 # define _LIBCPP_WEAK
488 #define _LIBCPP_HAS_NO_ASAN
490 #elif defined(__IBMCPP__)
492 #define _ALIGNAS(x) __attribute__((__aligned__(x)))
493 #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
494 #define _ATTRIBUTE(x) __attribute__((x))
495 #define _LIBCPP_NORETURN __attribute__((noreturn))
497 #define _NOEXCEPT throw()
498 #define _NOEXCEPT_(x)
499 #define _NOEXCEPT_OR_FALSE(x) false
501 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
502 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
503 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
504 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
505 #define _LIBCPP_HAS_NO_NULLPTR
506 #define _LIBCPP_HAS_NO_UNICODE_CHARS
507 #define _LIBCPP_HAS_IS_BASE_OF
510 #define __MULTILOCALE_API
513 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
514 #define _LIBCPP_END_NAMESPACE_STD } }
515 #define _VSTD std::_LIBCPP_NAMESPACE
518 inline namespace _LIBCPP_NAMESPACE {
522 #define _LIBCPP_HAS_NO_ASAN
524 #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
526 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
527 typedef unsigned short char16_t;
528 typedef unsigned int char32_t;
529 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
531 #ifndef __SIZEOF_INT128__
532 #define _LIBCPP_HAS_NO_INT128
535 #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT
537 template <bool> struct __static_assert_test;
538 template <> struct __static_assert_test<true> {};
539 template <unsigned> struct __static_assert_check {};
540 #define static_assert(__b, __m) \
541 typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \
542 _LIBCPP_CONCAT(__t, __LINE__)
544 #endif // _LIBCPP_HAS_NO_STATIC_ASSERT
546 #ifdef _LIBCPP_HAS_NO_DECLTYPE
547 #define decltype(x) __typeof__(x)
550 #ifdef _LIBCPP_HAS_NO_CONSTEXPR
551 #define _LIBCPP_CONSTEXPR
553 #define _LIBCPP_CONSTEXPR constexpr
556 #ifdef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
557 #define _LIBCPP_DEFAULT {}
559 #define _LIBCPP_DEFAULT = default;
563 #define _NOALIAS __attribute__((__malloc__))
568 #ifndef __has_feature
569 #define __has_feature(__x) 0
572 #ifndef __has_builtin
573 #define __has_builtin(__x) 0
576 #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__)
577 # define _LIBCPP_EXPLICIT explicit
579 # define _LIBCPP_EXPLICIT
582 #if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete)
583 # define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
586 #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
587 #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
588 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
590 _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \
591 _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \
592 _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
594 #else // _LIBCPP_HAS_NO_STRONG_ENUMS
595 #define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS x
596 #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
597 #endif // _LIBCPP_HAS_NO_STRONG_ENUMS
600 # if _LIBCPP_DEBUG == 0
601 # define _LIBCPP_DEBUG_LEVEL 1
602 # elif _LIBCPP_DEBUG == 1
603 # define _LIBCPP_DEBUG_LEVEL 2
605 # error Supported values for _LIBCPP_DEBUG are 0 and 1
607 # define _LIBCPP_EXTERN_TEMPLATE(...)
610 #ifndef _LIBCPP_EXTERN_TEMPLATE
611 #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
614 #ifndef _LIBCPP_EXTERN_TEMPLATE2
615 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__;
618 #if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
619 #define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63)
622 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
623 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
627 #define _DECLARE_C99_LDBL_MATH 1
630 #if defined(__APPLE__) || defined(__FreeBSD__)
631 #define _LIBCPP_HAS_DEFAULTRUNELOCALE
634 #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
635 #define _LIBCPP_WCTYPE_IS_MASK
638 #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
639 # define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
642 #ifndef _LIBCPP_STD_VER
643 # if __cplusplus <= 201103L
644 # define _LIBCPP_STD_VER 11
645 # elif __cplusplus <= 201402L
646 # define _LIBCPP_STD_VER 14
648 # define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification
650 #endif // _LIBCPP_STD_VER
652 #if _LIBCPP_STD_VER > 11
653 #define _LIBCPP_DEPRECATED [[deprecated]]
655 #define _LIBCPP_DEPRECATED
658 #if _LIBCPP_STD_VER <= 11
659 #define _LIBCPP_EXPLICIT_AFTER_CXX11
660 #define _LIBCPP_DEPRECATED_AFTER_CXX11
662 #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
663 #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]]
666 #if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
667 #define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
669 #define _LIBCPP_CONSTEXPR_AFTER_CXX11
672 #ifndef _LIBCPP_HAS_NO_ASAN
673 extern "C" void __sanitizer_annotate_contiguous_container(
674 const void *, const void *, const void *, const void *);
677 // Try to find out if RTTI is disabled.
678 // g++ and cl.exe have RTTI on by default and define a macro when it is.
679 // g++ only defines the macro in 4.3.2 and onwards.
680 #if !defined(_LIBCPP_NO_RTTI)
681 # if defined(__GNUG__) && (__GNUC__ >= 4 && \
682 (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI)
683 # define _LIBCPP_NO_RTTI
684 # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI)
685 # define _LIBCPP_NO_RTTI
690 # define _LIBCPP_WEAK __attribute__((__weak__))
693 #endif // _LIBCPP_CONFIG