Reviewed By: #libc, ldionne, Mordante
Spies: Mordante, libcxx-commits
Differential Revision: https://reviews.llvm.org/D150421
// atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type
-#ifdef __cpp_lib_atomic_is_always_lock_free
+#if _LIBCPP_STD_VER >= 17
# define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value
#else
# define _LIBCPP_CONTENTION_LOCK_FREE false
{
mutable __cxx_atomic_impl<_Tp> __a_;
-#if defined(__cpp_lib_atomic_is_always_lock_free)
+#if _LIBCPP_STD_VER >= 17
static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value;
#endif
__atomic_base(const __atomic_base&) = delete;
};
-#if defined(__cpp_lib_atomic_is_always_lock_free)
+#if _LIBCPP_STD_VER >= 17
template <class _Tp, bool __b>
_LIBCPP_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free;
#endif