summaryrefslogtreecommitdiff
path: root/include/__config
diff options
context:
space:
mode:
Diffstat (limited to 'include/__config')
-rw-r--r--include/__config104
1 files changed, 84 insertions, 20 deletions
diff --git a/include/__config b/include/__config
index db5a832b6cd14..3edb9de017abd 100644
--- a/include/__config
+++ b/include/__config
@@ -27,7 +27,7 @@
#define _GNUC_VER 0
#endif
-#define _LIBCPP_VERSION 3800
+#define _LIBCPP_VERSION 3900
#ifndef _LIBCPP_ABI_VERSION
#define _LIBCPP_ABI_VERSION 1
@@ -41,6 +41,22 @@
#define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
// Fix undefined behavior in how std::list stores it's linked nodes.
#define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB
+// Fix undefined behavior in how __tree stores its end and parent nodes.
+#define _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB
+#define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
+#define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
+#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
+#elif _LIBCPP_ABI_VERSION == 1
+// Feature macros for disabling pre ABI v1 features. All of these options
+// are deprecated.
+#if defined(__FreeBSD__)
+#define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+#endif
+#endif
+
+#ifdef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
+#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
+ use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#endif
#define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y
@@ -178,6 +194,12 @@
# endif
#endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
+#if __has_attribute(__no_sanitize__)
+#define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
+#else
+#define _LIBCPP_NO_CFI
+#endif
+
#ifdef _WIN32
// only really useful for a DLL
@@ -236,6 +258,12 @@
# endif
#endif
+#ifndef _LIBCPP_PREFERRED_OVERLOAD
+# if __has_attribute(__enable_if__)
+# define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, "")))
+# endif
+#endif
+
#ifndef _LIBCPP_TYPE_VIS_ONLY
# define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS
#endif
@@ -283,7 +311,7 @@ typedef __char16_t char16_t;
typedef __char32_t char32_t;
#endif
-#if !(__has_feature(cxx_exceptions))
+#if !(__has_feature(cxx_exceptions)) && !defined(_LIBCPP_NO_EXCEPTIONS)
#define _LIBCPP_NO_EXCEPTIONS
#endif
@@ -305,8 +333,6 @@ typedef __char32_t char32_t;
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
-#define _LIBCPP_UNUSED __attribute__((__unused__))
-
#if !(__has_feature(cxx_default_function_template_args))
#define _LIBCPP_HAS_NO_DEFAULT_FUNCTION_TEMPLATE_ARGS
#endif
@@ -434,8 +460,8 @@ namespace std {
#endif
// Allow for build-time disabling of unsigned integer sanitization
-#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute((no_sanitize("unsigned-integer-overflow")))
+#if !defined(_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK) && __has_attribute(no_sanitize)
+#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
#endif
#elif defined(__GNUC__)
@@ -445,8 +471,6 @@ namespace std {
#define _LIBCPP_NORETURN __attribute__((noreturn))
-#define _LIBCPP_UNUSED __attribute__((__unused__))
-
#if _GNUC_VER >= 407
#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T)
#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T)
@@ -461,8 +485,6 @@ namespace std {
#define _LIBCPP_NO_EXCEPTIONS
#endif
-#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
-
// constexpr was added to GCC in 4.6.
#if _GNUC_VER < 406
#define _LIBCPP_HAS_NO_CONSTEXPR
@@ -494,6 +516,7 @@ namespace std {
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#define _LIBCPP_HAS_NO_STRONG_ENUMS
+#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#define _LIBCPP_HAS_NO_NOEXCEPT
#else // __GXX_EXPERIMENTAL_CXX0X__
@@ -517,6 +540,7 @@ namespace std {
#if _GNUC_VER < 406
#define _LIBCPP_HAS_NO_NOEXCEPT
#define _LIBCPP_HAS_NO_NULLPTR
+#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
#endif
#if _GNUC_VER < 407
@@ -552,7 +576,6 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
#define _LIBCPP_HAS_NO_NOEXCEPT
#define __alignof__ __alignof
#define _LIBCPP_NORETURN __declspec(noreturn)
-#define _LIBCPP_UNUSED
#define _ALIGNAS(x) __declspec(align(x))
#define _LIBCPP_HAS_NO_VARIADICS
@@ -574,7 +597,6 @@ namespace std {
#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
#define _ATTRIBUTE(x) __attribute__((x))
#define _LIBCPP_NORETURN __attribute__((noreturn))
-#define _LIBCPP_UNUSED
#define _LIBCPP_HAS_NO_DEFAULT_FUNCTION_TEMPLATE_ARGS
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
@@ -655,6 +677,12 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_DEFAULT = default;
#endif
+#ifdef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define _LIBCPP_EQUAL_DELETE
+#else
+#define _LIBCPP_EQUAL_DELETE = delete
+#endif
+
#ifdef __GNUC__
#define _NOALIAS __attribute__((__malloc__))
#else
@@ -712,10 +740,12 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
-#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION) && \
- !defined(__CloudABI__)
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+// Most unix variants have catopen. These are the specific ones that don't.
+#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION)
#define _LIBCPP_HAS_CATOPEN 1
#endif
+#endif
#ifdef __FreeBSD__
#define _DECLARE_C99_LDBL_MATH 1
@@ -729,17 +759,13 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_WCTYPE_IS_MASK
#endif
-#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
-# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
-#endif
-
#ifndef _LIBCPP_STD_VER
# if __cplusplus <= 201103L
# define _LIBCPP_STD_VER 11
# elif __cplusplus <= 201402L
# define _LIBCPP_STD_VER 14
# else
-# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification
+# define _LIBCPP_STD_VER 16 // current year, or date of c++17 ratification
# endif
#endif // _LIBCPP_STD_VER
@@ -763,6 +789,12 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_CONSTEXPR_AFTER_CXX11
#endif
+#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR)
+#define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr
+#else
+#define _LIBCPP_CONSTEXPR_AFTER_CXX14
+#endif
+
#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
# define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x)
#else
@@ -790,6 +822,25 @@ extern "C" void __sanitizer_annotate_contiguous_container(
# define _LIBCPP_WEAK __attribute__((__weak__))
#endif
+// Thread API
+#if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+# if defined(__FreeBSD__) || \
+ defined(__NetBSD__) || \
+ defined(__linux__) || \
+ defined(__APPLE__) || \
+ defined(__CloudABI__) || \
+ defined(__sun__)
+# define _LIBCPP_HAS_THREAD_API_PTHREAD
+# else
+# error "No thread API"
+# endif // _LIBCPP_HAS_THREAD_API
+#endif // _LIBCPP_HAS_NO_THREADS
+
+#if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+# error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \
+ _LIBCPP_HAS_NO_THREADS is not defined.
+#endif
+
#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
_LIBCPP_HAS_NO_THREADS is defined.
@@ -833,7 +884,20 @@ extern "C" void __sanitizer_annotate_contiguous_container(
#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-#endif
+#endif
+
+#if __cplusplus < 201103L
+#define _LIBCPP_CXX03_LANG
+#else
+#if defined(_LIBCPP_HAS_NO_VARIADIC_TEMPLATES) || defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
+#error Libc++ requires a feature complete C++11 compiler in C++11 or greater.
+#endif
+#endif
+
+#if (defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS) && defined(__clang__) \
+ && __has_attribute(acquire_capability))
+#define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
+#endif
#endif // __cplusplus