From 59fae7b2c0c7e772c83ef87c4724e9ff389fbccf Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 22 Mar 2022 16:48:30 -0400 Subject: [PATCH] [libc++][NFC] Slight improvement to __availability documentation --- libcxx/include/__availability | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libcxx/include/__availability b/libcxx/include/__availability index b0f52ad1e96d..35c4468b0ed8 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 , , + // , 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