[libcxx-commits] [libcxx] 59fae7b - [libc++][NFC] Slight improvement to __availability documentation
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 22 13:48:43 PDT 2022
Author: Louis Dionne
Date: 2022-03-22T16:48:35-04:00
New Revision: 59fae7b2c0c7e772c83ef87c4724e9ff389fbccf
URL: https://github.com/llvm/llvm-project/commit/59fae7b2c0c7e772c83ef87c4724e9ff389fbccf
DIFF: https://github.com/llvm/llvm-project/commit/59fae7b2c0c7e772c83ef87c4724e9ff389fbccf.diff
LOG: [libc++][NFC] Slight improvement to __availability documentation
Added:
Modified:
libcxx/include/__availability
Removed:
################################################################################
diff --git a/libcxx/include/__availability b/libcxx/include/__availability
index b0f52ad1e96dd..35c4468b0ed85 100644
--- a/libcxx/include/__availability
+++ b/libcxx/include/__availability
@@ -91,6 +91,10 @@
// other exception types. These were put in the shared library to prevent
// code bloat from every user program defining the vtable for these exception
// types.
+ //
+ // 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_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST
@@ -99,10 +103,15 @@
# define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS
// This controls the availability of the sized version of ::operator delete,
- // which was added to the dylib later.
+ // ::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_SIZED_NEW_DELETE
// This controls the availability of the std::future_error exception.
+ //
+ // 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_FUTURE_ERROR
// This controls the availability of std::type_info's vtable.
@@ -126,7 +135,7 @@
# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
- // This controls the availability of std::to_chars.
+ // This controls the availability of std::to_chars for integral arguments.
# define _LIBCPP_AVAILABILITY_TO_CHARS
// This controls the availability of floating-point std::to_chars functions.
@@ -135,7 +144,8 @@
// This controls the availability of the C++20 synchronization library,
// which requires shared library support for various operations
- // (see libcxx/src/atomic.cpp).
+ // (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
+ // <semaphore>, and notification functions on std::atomic.
# define _LIBCPP_AVAILABILITY_SYNC
// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
// # define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
More information about the libcxx-commits
mailing list