aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__availability
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:16:42 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:33:25 +0300
commit9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch)
tree3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/__availability
parentf5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff)
downloadydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6 c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__availability')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__availability202
1 files changed, 144 insertions, 58 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__availability b/contrib/libs/cxxsupp/libcxx/include/__availability
index 6dfca3fa8b..7807f22b71 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__availability
+++ b/contrib/libs/cxxsupp/libcxx/include/__availability
@@ -39,17 +39,23 @@
//
// This mechanism is general in nature, and any vendor can add their markup to
// the library (see below). Whenever a new feature is added that requires support
-// in the shared library, a macro should be added below to mark this feature
-// as unavailable. When vendors decide to ship the feature as part of their
-// shared library, they can update the markup appropriately.
+// in the shared library, two macros are added below to allow marking the feature
+// as unavailable:
+// 1. A macro named `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` which must be defined
+// exactly when compiling for a target that doesn't support the feature.
+// 2. A macro named `_LIBCPP_AVAILABILITY_<feature>`, which must always be defined
+// and must expand to the proper availability attribute for the platform.
+//
+// When vendors decide to ship the feature as part of their shared library, they
+// can update these macros appropriately for their platform, and the library will
+// use those to provide an optimal user experience.
//
// Furthermore, many features in the standard library have corresponding
-// feature-test macros. When a feature is made unavailable on some deployment
-// target, a macro should be defined to signal that it is unavailable. That
-// macro can then be picked up when feature-test macros are generated (see
-// generate_feature_test_macro_components.py) to make sure that feature-test
-// macros don't announce a feature as being implemented if it has been marked
-// as unavailable.
+// feature-test macros. The `_LIBCPP_AVAILABILITY_HAS_NO_<feature>` macros
+// are checked by the corresponding feature-test macros generated by
+// generate_feature_test_macro_components.py to ensure that the library
+// doesn't announce a feature as being implemented if it is unavailable on
+// the deployment target.
//
// Note that this mechanism is disabled by default in the "upstream" libc++.
// Availability annotations are only meaningful when shipping libc++ inside
@@ -83,9 +89,8 @@
// This controls the availability of std::shared_mutex and std::shared_timed_mutex,
// which were added to the dylib later.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX
# define _LIBCPP_AVAILABILITY_SHARED_MUTEX
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
// These macros control the availability of std::bad_optional_access and
// other exception types. These were put in the shared library to prevent
@@ -95,16 +100,23 @@
// Note that when exceptions are disabled, the methods that normally throw
// these exceptions can be used even on older deployment targets, but those
// methods will abort instead of throwing.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+
+// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
+
+// # define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST
// This controls the availability of std::uncaught_exceptions().
+// # define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS
# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS
// This controls the availability of the sized version of ::operator delete,
// ::operator delete[], and their align_val_t variants, which were all added
// in C++17, and hence not present in early dylibs.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE
# define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE
// This controls the availability of the std::future_error exception.
@@ -112,73 +124,83 @@
// Note that when exceptions are disabled, the methods that normally throw
// std::future_error can be used even on older deployment targets, but those
// methods will abort instead of throwing.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR
# define _LIBCPP_AVAILABILITY_FUTURE_ERROR
// This controls the availability of std::type_info's vtable.
// I can't imagine how using std::type_info can work at all if
// this isn't supported.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE
# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
// This controls the availability of std::locale::category members
// (e.g. std::locale::collate), which are defined in the dylib.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY
# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
// This controls the availability of atomic operations on std::shared_ptr
// (e.g. `std::atomic_store(std::shared_ptr)`), which require a shared
// lock table located in the dylib.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
// These macros control the availability of all parts of <filesystem> that
// depend on something in the dylib.
-# define _LIBCPP_AVAILABILITY_FILESYSTEM
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
+// # define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
// This controls the availability of floating-point std::to_chars functions.
// These overloads were added later than the integer overloads.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT
# define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT
// This controls the availability of the C++20 synchronization library,
// which requires shared library support for various operations
// (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
// <semaphore>, and notification functions on std::atomic.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_SYNC
# define _LIBCPP_AVAILABILITY_SYNC
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
-
- // This controls the availability of the C++20 format library.
- // The library is in development and not ABI stable yet. P2216 is
- // retroactively accepted in C++20. This paper contains ABI breaking
- // changes.
-# define _LIBCPP_AVAILABILITY_FORMAT
-// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
// This controls whether the library claims to provide a default verbose
// termination function, and consequently whether the headers will try
// to use it when the mechanism isn't overriden at compile-time.
-// # define _LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
+// # define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
+# define _LIBCPP_AVAILABILITY_VERBOSE_ABORT
+
+ // This controls the availability of the C++17 std::pmr library,
+ // which is implemented in large part in the built library.
+// # define _LIBCPP_AVAILABILITY_HAS_NO_PMR
+# define _LIBCPP_AVAILABILITY_PMR
#elif defined(__APPLE__)
-# define _LIBCPP_AVAILABILITY_SHARED_MUTEX \
- __attribute__((availability(macos,strict,introduced=10.12))) \
- __attribute__((availability(ios,strict,introduced=10.0))) \
- __attribute__((availability(tvos,strict,introduced=10.0))) \
- __attribute__((availability(watchos,strict,introduced=3.0)))
+ // shared_mutex and shared_timed_mutex
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
+# define _LIBCPP_AVAILABILITY_HAS_NO_SHARED_MUTEX
# endif
+# define _LIBCPP_AVAILABILITY_SHARED_MUTEX \
+ __attribute__((availability(macos,strict,introduced=10.12))) \
+ __attribute__((availability(ios,strict,introduced=10.0))) \
+ __attribute__((availability(tvos,strict,introduced=10.0))) \
+ __attribute__((availability(watchos,strict,introduced=3.0)))
+ // bad_optional_access, bad_variant_access and bad_any_cast
// Note: bad_optional_access & friends were not introduced in the matching
// macOS and iOS versions, so the version mismatch between macOS and others
// is intended.
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_OPTIONAL_ACCESS
+# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_VARIANT_ACCESS
+# define _LIBCPP_AVAILABILITY_HAS_NO_BAD_ANY_CAST
+# endif
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \
__attribute__((availability(macos,strict,introduced=10.13))) \
__attribute__((availability(ios,strict,introduced=12.0))) \
@@ -189,78 +211,142 @@
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+ // uncaught_exceptions
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_UNCAUGHT_EXCEPTIONS
+# endif
# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \
__attribute__((availability(macos,strict,introduced=10.12))) \
__attribute__((availability(ios,strict,introduced=10.0))) \
__attribute__((availability(tvos,strict,introduced=10.0))) \
__attribute__((availability(watchos,strict,introduced=3.0)))
+ // sized operator new and sized operator delete
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_SIZED_NEW_DELETE
+# endif
# define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \
__attribute__((availability(macos,strict,introduced=10.12))) \
__attribute__((availability(ios,strict,introduced=10.0))) \
__attribute__((availability(tvos,strict,introduced=10.0))) \
__attribute__((availability(watchos,strict,introduced=3.0)))
+ // future_error
+# if (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 60000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_FUTURE_ERROR
+# endif
# define _LIBCPP_AVAILABILITY_FUTURE_ERROR \
__attribute__((availability(ios,strict,introduced=6.0)))
+ // type_info's vtable
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_TYPEINFO_VTABLE
+# endif
# define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \
__attribute__((availability(macos,strict,introduced=10.9))) \
__attribute__((availability(ios,strict,introduced=7.0)))
+ // locale::category
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_LOCALE_CATEGORY
+# endif
# define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \
__attribute__((availability(macos,strict,introduced=10.9))) \
__attribute__((availability(ios,strict,introduced=7.0)))
+ // atomic operations on shared_ptr
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 100900) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 70000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_ATOMIC_SHARED_PTR
+# endif
# define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \
__attribute__((availability(macos,strict,introduced=10.9))) \
__attribute__((availability(ios,strict,introduced=7.0)))
-# define _LIBCPP_AVAILABILITY_FILESYSTEM \
+ // <filesystem>
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
+# endif
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY \
__attribute__((availability(macos,strict,introduced=10.15))) \
__attribute__((availability(ios,strict,introduced=13.0))) \
__attribute__((availability(tvos,strict,introduced=13.0))) \
__attribute__((availability(watchos,strict,introduced=6.0)))
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH \
_Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP \
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop")
-# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) || \
- (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
- (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \
- (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
-# endif
+ // std::to_chars(floating-point)
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130300) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160300) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160300) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90300)
+# define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT
+# endif
# define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT \
- __attribute__((unavailable))
+ __attribute__((availability(macos,strict,introduced=13.3))) \
+ __attribute__((availability(ios,strict,introduced=16.3))) \
+ __attribute__((availability(tvos,strict,introduced=16.3))) \
+ __attribute__((availability(watchos,strict,introduced=9.3)))
-# define _LIBCPP_AVAILABILITY_SYNC \
- __attribute__((availability(macos,strict,introduced=11.0))) \
- __attribute__((availability(ios,strict,introduced=14.0))) \
- __attribute__((availability(tvos,strict,introduced=14.0))) \
- __attribute__((availability(watchos,strict,introduced=7.0)))
+ // c++20 synchronization library
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
+# define _LIBCPP_AVAILABILITY_HAS_NO_SYNC
# endif
+# define _LIBCPP_AVAILABILITY_SYNC \
+ __attribute__((availability(macos,strict,introduced=11.0))) \
+ __attribute__((availability(ios,strict,introduced=14.0))) \
+ __attribute__((availability(tvos,strict,introduced=14.0))) \
+ __attribute__((availability(watchos,strict,introduced=7.0)))
-# define _LIBCPP_AVAILABILITY_FORMAT \
+ // __libcpp_verbose_abort
+# if 1 // TODO: Update once this is released
+# define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
+# endif
+# define _LIBCPP_AVAILABILITY_VERBOSE_ABORT \
__attribute__((unavailable))
-# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
-# define _LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
+ // std::pmr
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) || \
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) || \
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
+# define _LIBCPP_AVAILABILITY_HAS_NO_PMR
+# endif
+// TODO: Enable std::pmr markup once https://github.com/llvm/llvm-project/issues/40340 has been fixed
+// Until then, it is possible for folks to try to use `std::pmr` when back-deploying to targets that don't support
+// it and it'll be a load-time error, but we don't have a good alternative because the library won't compile if we
+// use availability annotations until that bug has been fixed.
+# if 0
+# define _LIBCPP_AVAILABILITY_PMR \
+ __attribute__((availability(macos, strict, introduced = 14.0))) \
+ __attribute__((availability(ios, strict, introduced = 17.0))) \
+ __attribute__((availability(tvos, strict, introduced = 17.0))) \
+ __attribute__((availability(watchos, strict, introduced = 10.0)))
+# else
+# define _LIBCPP_AVAILABILITY_PMR
+# endif
#else
@@ -270,10 +356,10 @@
#endif
-// Define availability attributes that depend on _LIBCPP_NO_EXCEPTIONS.
+// Define availability attributes that depend on _LIBCPP_HAS_NO_EXCEPTIONS.
// Those are defined in terms of the availability attributes above, and
// should not be vendor-specific.
-#if defined(_LIBCPP_NO_EXCEPTIONS)
+#if defined(_LIBCPP_HAS_NO_EXCEPTIONS)
# define _LIBCPP_AVAILABILITY_FUTURE
# define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
# define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS