Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++][NFC] Refactor _LIBCPP_AVAILABILITY_HAS_* macros to always be defined #71002

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 104 additions & 91 deletions libcxx/include/__availability
Original file line number Diff line number Diff line change
Expand Up @@ -87,57 +87,57 @@

#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)

// These macros control the availability of std::bad_optional_access and
// 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_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

// These macros control the availability of all parts of <filesystem> that
// depend on something in the dylib.
// # 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

// 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_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

// This controls the availability of the C++20 time zone database.
// The parser code is built in the library.
// # define _LIBCPP_AVAILABILITY_HAS_NO_TZDB
# define _LIBCPP_AVAILABILITY_TZDB
// These macros control the availability of std::bad_optional_access and
// 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_HAS_BAD_OPTIONAL_ACCESS 1
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS

# define _LIBCPP_AVAILABILITY_HAS_BAD_VARIANT_ACCESS 1
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS

# define _LIBCPP_AVAILABILITY_HAS_BAD_ANY_CAST 1
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST

// These macros control the availability of all parts of <filesystem> that
// depend on something in the dylib.
# define _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY 1
# 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_TO_CHARS_FLOATING_POINT 1
# 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_SYNC 1
# define _LIBCPP_AVAILABILITY_SYNC

// 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_AVAILABILITY_HAS_VERBOSE_ABORT 1
# 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_PMR 1
# define _LIBCPP_AVAILABILITY_PMR

// This controls the availability of the C++20 time zone database.
// The parser code is built in the library.
# define _LIBCPP_AVAILABILITY_HAS_TZDB 1
# define _LIBCPP_AVAILABILITY_TZDB

// Enable additional explicit instantiations of iostreams components. This
// reduces the number of weak definitions generated in programs that use
Expand All @@ -146,28 +146,33 @@
// TODO: Enable additional explicit instantiations on GCC once it supports exclude_from_explicit_instantiation,
// or once libc++ doesn't use the attribute anymore.
// TODO: Enable them on Windows once https://llvm.org/PR41018 has been fixed.
#if defined(_LIBCPP_COMPILER_GCC) || defined(_WIN32)
# define _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
#endif
# if !defined(_LIBCPP_COMPILER_GCC) && !defined(_WIN32)
# define _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1 1
# else
# define _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1 0
# endif

#elif defined(__APPLE__)

# if (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_HAS_BAD_OPTIONAL_ACCESS \
(!defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 50000)

# define _LIBCPP_AVAILABILITY_HAS_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_HAS_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_HAS_BAD_ANY_CAST _LIBCPP_AVAILABILITY_HAS_BAD_OPTIONAL_ACCESS

# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((availability(watchos,strict,introduced=5.0)))
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS

// <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
// <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_FILESYSTEM_LIBRARY 0
# else
# define _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY 1
# endif
# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY \
__attribute__((availability(macos,strict,introduced=10.15))) \
__attribute__((availability(ios,strict,introduced=13.0))) \
Expand All @@ -184,46 +189,52 @@
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop")

// 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
// 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_TO_CHARS_FLOATING_POINT 0
# else
# define _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT 1
# endif
# define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT \
__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)))

// 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_HAS_NO_SYNC
# 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_HAS_SYNC 0
# else
# define _LIBCPP_AVAILABILITY_HAS_SYNC 1
# 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)))

// __libcpp_verbose_abort
# if 1 // TODO: Update once this is released
# define _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
# endif
// __libcpp_verbose_abort
// TODO: Update once this is released
# define _LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT 0

# define _LIBCPP_AVAILABILITY_VERBOSE_ABORT \
__attribute__((unavailable))

// 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
// 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_PMR 0
# else
# define _LIBCPP_AVAILABILITY_HAS_PMR 1
# 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
Expand All @@ -238,14 +249,16 @@
# define _LIBCPP_AVAILABILITY_PMR
# endif

# define _LIBCPP_AVAILABILITY_HAS_NO_TZDB
# define _LIBCPP_AVAILABILITY_HAS_TZDB 0
# define _LIBCPP_AVAILABILITY_TZDB __attribute__((unavailable))

# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80000)
# define _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
# define _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1 0
# else
# define _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1 1
# endif
#else

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__verbose_abort
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void __libcpp_verbose_abort(const char *__format, ...);
// make sure that the program terminates but without taking any complex dependencies in this header.
#if !defined(_LIBCPP_VERBOSE_ABORT)

# if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT)
# if !_LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT
// The decltype is there to suppress -Wunused warnings in this configuration.
void __use(const char*, ...);
# define _LIBCPP_VERBOSE_ABORT(...) (decltype(::std::__use(__VA_ARGS__))(), __builtin_abort())
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/fstream
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ basic_fstream<_CharT, _Traits>::close()
this->setstate(ios_base::failbit);
}

#ifndef _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
#if _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ifstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ofstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
__x.swap(__y);
}

#ifndef _LIBCPP_AVAILABILITY_HAS_NO_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
#if _LIBCPP_AVAILABILITY_HAS_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringbuf<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>;
Expand Down
17 changes: 9 additions & 8 deletions libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
*/

#include <__assert> // all public C++ headers provide the assertion handler
#include <__availability>
#include <__config>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down Expand Up @@ -292,7 +293,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
# define __cpp_lib_clamp 201603L
# define __cpp_lib_enable_shared_from_this 201603L
// # define __cpp_lib_execution 201603L
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# if _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY
# define __cpp_lib_filesystem 201703L
# endif
# define __cpp_lib_gcd_lcm 201606L
Expand All @@ -311,7 +312,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
# define __cpp_lib_make_from_tuple 201606L
# define __cpp_lib_map_try_emplace 201411L
// # define __cpp_lib_math_special_functions 201603L
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_PMR)
# if _LIBCPP_AVAILABILITY_HAS_PMR
# define __cpp_lib_memory_resource 201603L
# endif
# define __cpp_lib_node_extract 201606L
Expand Down Expand Up @@ -348,10 +349,10 @@ __cpp_lib_within_lifetime 202306L <type_traits>
// # define __cpp_lib_atomic_ref 201806L
// # define __cpp_lib_atomic_shared_ptr 201711L
# define __cpp_lib_atomic_value_initialization 201911L
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
# if _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_atomic_wait 201907L
# endif
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_barrier 201907L
# endif
# define __cpp_lib_bind_front 201907L
Expand Down Expand Up @@ -392,21 +393,21 @@ __cpp_lib_within_lifetime 202306L <type_traits>
// # define __cpp_lib_is_layout_compatible 201907L
# define __cpp_lib_is_nothrow_convertible 201806L
// # define __cpp_lib_is_pointer_interconvertible 201907L
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN) && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_jthread 201911L
# endif
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_latch 201907L
# endif
# define __cpp_lib_list_remove_return_type 201806L
# define __cpp_lib_math_constants 201907L
# define __cpp_lib_move_iterator_concept 202207L
# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_PMR)
# if _LIBCPP_AVAILABILITY_HAS_PMR
# define __cpp_lib_polymorphic_allocator 201902L
# endif
# define __cpp_lib_ranges 202207L
# define __cpp_lib_remove_cvref 201711L
# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_HAS_NO_SYNC)
# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_semaphore 201907L
# endif
# undef __cpp_lib_shared_ptr_arrays
Expand Down
Loading