@@ -57,7 +57,8 @@ struct __atomic_waitable< _Tp,
57
57
decltype (__atomic_waitable_traits<__decay_t <_Tp> >::__atomic_contention_address(
58
58
std::declval<const _Tp&>()))> > : true_type {};
59
59
60
- #if _LIBCPP_HAS_THREADS
60
+ #if _LIBCPP_STD_VER >= 20
61
+ # if _LIBCPP_HAS_THREADS
61
62
62
63
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one (void const volatile *) _NOEXCEPT;
63
64
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all (void const volatile *) _NOEXCEPT;
@@ -156,7 +157,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _
156
157
std::__cxx_atomic_notify_all (__atomic_waitable_traits<__decay_t <_AtomicWaitable> >::__atomic_contention_address (__a));
157
158
}
158
159
159
- #else // _LIBCPP_HAS_THREADS
160
+ # else // _LIBCPP_HAS_THREADS
160
161
161
162
template <class _AtomicWaitable , class _Poll >
162
163
_LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless (const _AtomicWaitable& __a, memory_order __order, _Poll&& __poll) {
@@ -175,7 +176,7 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable&) {}
175
176
template <class _AtomicWaitable >
176
177
_LIBCPP_HIDE_FROM_ABI void __atomic_notify_all (const _AtomicWaitable&) {}
177
178
178
- #endif // _LIBCPP_HAS_THREADS
179
+ # endif // _LIBCPP_HAS_THREADS
179
180
180
181
template <typename _Tp>
181
182
_LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal (_Tp const & __lhs, _Tp const & __rhs) {
@@ -191,6 +192,8 @@ __atomic_wait(_AtomicWaitable& __a, _Tp __val, memory_order __order) {
191
192
});
192
193
}
193
194
195
+ #endif // C++20
196
+
194
197
_LIBCPP_END_NAMESPACE_STD
195
198
196
199
#endif // _LIBCPP___ATOMIC_ATOMIC_SYNC_H
0 commit comments