Index: libcxx/include/atomic =================================================================== --- libcxx/include/atomic +++ libcxx/include/atomic @@ -2737,6 +2737,8 @@ # define _LIBCPP_CONTENTION_LOCK_FREE false #endif +#if _LIBCPP_STD_VER > 17 + #if ATOMIC_LLONG_LOCK_FREE == 2 typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>::type __libcpp_signed_lock_free; typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>::type __libcpp_unsigned_lock_free; @@ -2751,10 +2753,15 @@ typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type __libcpp_unsigned_lock_free; #else // No signed/unsigned lock-free types +# define _LIBCPP_CANNOT_DEFINE_ATOMIC_LOCK_FREE_TYPE_ALIASES #endif +#ifndef _LIBCPP_CANNOT_DEFINE_ATOMIC_LOCK_FREE_TYPE_ALIASES typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free; typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free; +#endif + +#endif // _LIBCPP_STD_VER > 17 #define ATOMIC_FLAG_INIT {false} #define ATOMIC_VAR_INIT(__v) {__v}