Skip to content

Commit ab2f186

Browse files
committed
[libc++] Drop support for the C++20 Synchronization Library before C++20
When we initially implemented the C++20 synchronization library, we reluctantly accepted for the implementation to be backported to C++03 upon request from the person who provided the patch. This was when we were only starting to have experience with the issues this can create, so we flinched. Nowadays, we have a much stricter stance about not backporting features to previous standards. We have recently started fixing several bugs (and near bugs) in our implementation of the synchronization library. A recurring theme during these reviews has been how difficult to undertand the current code is, and upon inspection it becomes clear that being able to use a few recent C++ features (in particular lambdas) would help a great deal. The code would still be pretty intricate, but it would be a lot easier to reason about the flow of callbacks through things like __thread_poll_with_backoff. As a result, this patch drops support for the synchronization library before C++20. This makes us more strictly conforming and opens the door to major simplifications, in particular around atomic_wait which was supported all the way to C++03. This change will probably have some impact on downstream users, however since the C++20 synchronization library was added only in LLVM 10 (~3 years ago) and it's quite a niche feature, the set of people trying to use this part of the library before C++20 should be reasonably small.
1 parent b2b68c2 commit ab2f186

32 files changed

+116
-191
lines changed

libcxx/.clang-format

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ AttributeMacros: [
2424
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
2525
'_LIBCPP_CONSTEXPR',
2626
'_LIBCPP_CONSTINIT',
27-
'_LIBCPP_DEPRECATED_ATOMIC_SYNC',
2827
'_LIBCPP_DEPRECATED_IN_CXX11',
2928
'_LIBCPP_DEPRECATED_IN_CXX14',
3029
'_LIBCPP_DEPRECATED_IN_CXX17',

libcxx/docs/ReleaseNotes/20.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ Deprecations and Removals
5353
- TODO: The ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable and the ``_LIBCPP_ENABLE_ASSERTIONS`` macro that were used to enable
5454
the safe mode will be removed in LLVM 20.
5555

56-
- TODO: The C++20 synchronization library will be removed entirely in language modes prior to C++20 in LLVM 20.
56+
- Support for the C++20 synchronization library (``<barrier>``, ``<latch>``, ``atomic::wait``, etc.) has been
57+
removed in language modes prior to C++20. If you are using these features prior to C++20, you will need to
58+
update to ``-std=c++20``.
5759

5860
- TODO: The relational operators for ``std::chrono::weekday`` will be removed entirely, and the
5961
``_LIBCPP_ENABLE_REMOVED_WEEKDAY_RELATIONAL_OPERATORS`` macro that was used to re-enable this extension will be

libcxx/include/__atomic/atomic.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_strong_explicit(
429429
return __o->compare_exchange_strong(*__e, __d, __s, __f);
430430
}
431431

432+
#if _LIBCPP_STD_VER >= 20
433+
432434
// atomic_wait
433435

434436
template <class _Tp>
@@ -462,29 +464,27 @@ atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __
462464
// atomic_notify_one
463465

464466
template <class _Tp>
465-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
466-
atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT {
467+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT {
467468
__o->notify_one();
468469
}
469470
template <class _Tp>
470-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
471-
atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT {
471+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT {
472472
__o->notify_one();
473473
}
474474

475475
// atomic_notify_all
476476

477477
template <class _Tp>
478-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
479-
atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT {
478+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT {
480479
__o->notify_all();
481480
}
482481
template <class _Tp>
483-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
484-
atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT {
482+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT {
485483
__o->notify_all();
486484
}
487485

486+
#endif // _LIBCPP_STD_VER >= 20
487+
488488
// atomic_fetch_add
489489

490490
template <class _Tp>

libcxx/include/__atomic/atomic_base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ struct __atomic_base // false
101101
return std::__cxx_atomic_compare_exchange_strong(std::addressof(__a_), std::addressof(__e), __d, __m, __m);
102102
}
103103

104+
#if _LIBCPP_STD_VER >= 20
104105
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const
105106
volatile _NOEXCEPT {
106107
std::__atomic_wait(*this, __v, __m);
@@ -117,6 +118,7 @@ struct __atomic_base // false
117118
std::__atomic_notify_all(*this);
118119
}
119120
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
121+
#endif // _LIBCPP_STD_VER >= 20
120122

121123
#if _LIBCPP_STD_VER >= 20
122124
_LIBCPP_HIDE_FROM_ABI constexpr __atomic_base() noexcept(is_nothrow_default_constructible_v<_Tp>) : __a_(_Tp()) {}

libcxx/include/__atomic/atomic_flag.h

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,24 @@ struct atomic_flag {
4848
__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);
4949
}
5050

51-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
52-
wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT {
51+
#if _LIBCPP_STD_VER >= 20
52+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const
53+
volatile _NOEXCEPT {
5354
std::__atomic_wait(*this, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);
5455
}
55-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
56+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
5657
wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
5758
std::__atomic_wait(*this, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);
5859
}
59-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT {
60-
std::__atomic_notify_one(*this);
61-
}
62-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT {
60+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT {
6361
std::__atomic_notify_one(*this);
6462
}
63+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
6564
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT {
6665
std::__atomic_notify_all(*this);
6766
}
68-
_LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT {
69-
std::__atomic_notify_all(*this);
70-
}
67+
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
68+
#endif
7169

7270
#if _LIBCPP_STD_VER >= 20
7371
_LIBCPP_HIDE_FROM_ABI constexpr atomic_flag() _NOEXCEPT : __a_(false) {}
@@ -144,45 +142,45 @@ inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_clear_explicit(atomic_flag* __o, m
144142
__o->clear(__m);
145143
}
146144

147-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
145+
#if _LIBCPP_STD_VER >= 20
146+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
148147
atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT {
149148
__o->wait(__v);
150149
}
151150

152-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
151+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
153152
atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT {
154153
__o->wait(__v);
155154
}
156155

157-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
156+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
158157
atomic_flag_wait_explicit(const volatile atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
159158
__o->wait(__v, __m);
160159
}
161160

162-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
161+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
163162
atomic_flag_wait_explicit(const atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
164163
__o->wait(__v, __m);
165164
}
166165

167-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
166+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
168167
atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT {
169168
__o->notify_one();
170169
}
171170

172-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
173-
atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT {
171+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT {
174172
__o->notify_one();
175173
}
176174

177-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
175+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
178176
atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT {
179177
__o->notify_all();
180178
}
181179

182-
inline _LIBCPP_DEPRECATED_ATOMIC_SYNC _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
183-
atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT {
180+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT {
184181
__o->notify_all();
185182
}
183+
#endif // _LIBCPP_STD_VER >= 20
186184

187185
_LIBCPP_END_NAMESPACE_STD
188186

libcxx/include/__config

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -699,14 +699,6 @@ typedef __char32_t char32_t;
699699
# define _LIBCPP_DEPRECATED_(m)
700700
# endif
701701

702-
# if _LIBCPP_STD_VER < 20
703-
# define _LIBCPP_DEPRECATED_ATOMIC_SYNC \
704-
_LIBCPP_DEPRECATED_("The C++20 synchronization library has been deprecated prior to C++20. Please update to " \
705-
"using -std=c++20 if you need to use these facilities.")
706-
# else
707-
# define _LIBCPP_DEPRECATED_ATOMIC_SYNC /* nothing */
708-
# endif
709-
710702
# if !defined(_LIBCPP_CXX03_LANG)
711703
# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
712704
# else

libcxx/include/atomic

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ struct atomic
101101
bool compare_exchange_strong(T& expc, T desr,
102102
memory_order m = memory_order_seq_cst) noexcept;
103103
104-
void wait(T, memory_order = memory_order::seq_cst) const volatile noexcept;
105-
void wait(T, memory_order = memory_order::seq_cst) const noexcept;
106-
void notify_one() volatile noexcept;
107-
void notify_one() noexcept;
108-
void notify_all() volatile noexcept;
109-
void notify_all() noexcept;
104+
void wait(T, memory_order = memory_order::seq_cst) const volatile noexcept; // since C++20
105+
void wait(T, memory_order = memory_order::seq_cst) const noexcept; // since C++20
106+
void notify_one() volatile noexcept; // since C++20
107+
void notify_one() noexcept; // since C++20
108+
void notify_all() volatile noexcept; // since C++20
109+
void notify_all() noexcept; // since C++20
110110
};
111111
112112
template <>
@@ -184,12 +184,12 @@ struct atomic<integral>
184184
integral operator^=(integral op) volatile noexcept;
185185
integral operator^=(integral op) noexcept;
186186
187-
void wait(integral, memory_order = memory_order::seq_cst) const volatile noexcept;
188-
void wait(integral, memory_order = memory_order::seq_cst) const noexcept;
189-
void notify_one() volatile noexcept;
190-
void notify_one() noexcept;
191-
void notify_all() volatile noexcept;
192-
void notify_all() noexcept;
187+
void wait(integral, memory_order = memory_order::seq_cst) const volatile noexcept; // since C++20
188+
void wait(integral, memory_order = memory_order::seq_cst) const noexcept; // since C++20
189+
void notify_one() volatile noexcept; // since C++20
190+
void notify_one() noexcept; // since C++20
191+
void notify_all() volatile noexcept; // since C++20
192+
void notify_all() noexcept; // since C++20
193193
};
194194
195195
template <class T>
@@ -254,12 +254,12 @@ struct atomic<T*>
254254
T* operator-=(ptrdiff_t op) volatile noexcept;
255255
T* operator-=(ptrdiff_t op) noexcept;
256256
257-
void wait(T*, memory_order = memory_order::seq_cst) const volatile noexcept;
258-
void wait(T*, memory_order = memory_order::seq_cst) const noexcept;
259-
void notify_one() volatile noexcept;
260-
void notify_one() noexcept;
261-
void notify_all() volatile noexcept;
262-
void notify_all() noexcept;
257+
void wait(T*, memory_order = memory_order::seq_cst) const volatile noexcept; // since C++20
258+
void wait(T*, memory_order = memory_order::seq_cst) const noexcept; // since C++20
259+
void notify_one() volatile noexcept; // since C++20
260+
void notify_one() noexcept; // since C++20
261+
void notify_all() volatile noexcept; // since C++20
262+
void notify_all() noexcept; // since C++20
263263
};
264264
265265
template<>
@@ -321,12 +321,12 @@ struct atomic<floating-point-type> { // since C++20
321321
floating-point-type operator-=(floating-point-type) volatile noexcept;
322322
floating-point-type operator-=(floating-point-type) noexcept;
323323
324-
void wait(floating-point-type, memory_order = memory_order::seq_cst) const volatile noexcept;
325-
void wait(floating-point-type, memory_order = memory_order::seq_cst) const noexcept;
326-
void notify_one() volatile noexcept;
327-
void notify_one() noexcept;
328-
void notify_all() volatile noexcept;
329-
void notify_all() noexcept;
324+
void wait(floating-point-type, memory_order = memory_order::seq_cst) const volatile noexcept; // since C++20
325+
void wait(floating-point-type, memory_order = memory_order::seq_cst) const noexcept; // since C++20
326+
void notify_one() volatile noexcept; // since C++20
327+
void notify_one() noexcept; // since C++20
328+
void notify_all() volatile noexcept; // since C++20
329+
void notify_all() noexcept; // since C++20
330330
};
331331
332332
// [atomics.nonmembers], non-member functions
@@ -443,23 +443,23 @@ template<class T>
443443
memory_order) noexcept;
444444
445445
template<class T>
446-
void atomic_wait(const volatile atomic<T>*, atomic<T>::value_type) noexcept;
446+
void atomic_wait(const volatile atomic<T>*, atomic<T>::value_type) noexcept; // since C++20
447447
template<class T>
448-
void atomic_wait(const atomic<T>*, atomic<T>::value_type) noexcept;
448+
void atomic_wait(const atomic<T>*, atomic<T>::value_type) noexcept; // since C++20
449449
template<class T>
450-
void atomic_wait_explicit(const volatile atomic<T>*, atomic<T>::value_type,
450+
void atomic_wait_explicit(const volatile atomic<T>*, atomic<T>::value_type, // since C++20
451451
memory_order) noexcept;
452452
template<class T>
453-
void atomic_wait_explicit(const atomic<T>*, atomic<T>::value_type,
453+
void atomic_wait_explicit(const atomic<T>*, atomic<T>::value_type, // since C++20
454454
memory_order) noexcept;
455455
template<class T>
456-
void atomic_notify_one(volatile atomic<T>*) noexcept;
456+
void atomic_notify_one(volatile atomic<T>*) noexcept; // since C++20
457457
template<class T>
458-
void atomic_notify_one(atomic<T>*) noexcept;
458+
void atomic_notify_one(atomic<T>*) noexcept; // since C++20
459459
template<class T>
460-
void atomic_notify_all(volatile atomic<T>*) noexcept;
460+
void atomic_notify_all(volatile atomic<T>*) noexcept; // since C++20
461461
template<class T>
462-
void atomic_notify_all(atomic<T>*) noexcept;
462+
void atomic_notify_all(atomic<T>*) noexcept; // since C++20
463463
464464
// Atomics for standard typedef types
465465
@@ -534,12 +534,12 @@ typedef struct atomic_flag
534534
void clear(memory_order m = memory_order_seq_cst) volatile noexcept;
535535
void clear(memory_order m = memory_order_seq_cst) noexcept;
536536
537-
void wait(bool, memory_order = memory_order::seq_cst) const volatile noexcept;
538-
void wait(bool, memory_order = memory_order::seq_cst) const noexcept;
539-
void notify_one() volatile noexcept;
540-
void notify_one() noexcept;
541-
void notify_all() volatile noexcept;
542-
void notify_all() noexcept;
537+
void wait(bool, memory_order = memory_order::seq_cst) const volatile noexcept; // since C++20
538+
void wait(bool, memory_order = memory_order::seq_cst) const noexcept; // since C++20
539+
void notify_one() volatile noexcept; // since C++20
540+
void notify_one() noexcept; // since C++20
541+
void notify_all() volatile noexcept; // since C++20
542+
void notify_all() noexcept; // since C++20
543543
} atomic_flag;
544544
545545
bool atomic_flag_test(volatile atomic_flag* obj) noexcept;
@@ -557,14 +557,14 @@ void atomic_flag_clear(atomic_flag* obj) noexcept;
557557
void atomic_flag_clear_explicit(volatile atomic_flag* obj, memory_order m) noexcept;
558558
void atomic_flag_clear_explicit(atomic_flag* obj, memory_order m) noexcept;
559559
560-
void atomic_wait(const volatile atomic_flag* obj, T old) noexcept;
561-
void atomic_wait(const atomic_flag* obj, T old) noexcept;
562-
void atomic_wait_explicit(const volatile atomic_flag* obj, T old, memory_order m) noexcept;
563-
void atomic_wait_explicit(const atomic_flag* obj, T old, memory_order m) noexcept;
564-
void atomic_one(volatile atomic_flag* obj) noexcept;
565-
void atomic_one(atomic_flag* obj) noexcept;
566-
void atomic_all(volatile atomic_flag* obj) noexcept;
567-
void atomic_all(atomic_flag* obj) noexcept;
560+
void atomic_wait(const volatile atomic_flag* obj, T old) noexcept; // since C++20
561+
void atomic_wait(const atomic_flag* obj, T old) noexcept; // since C++20
562+
void atomic_wait_explicit(const volatile atomic_flag* obj, T old, memory_order m) noexcept; // since C++20
563+
void atomic_wait_explicit(const atomic_flag* obj, T old, memory_order m) noexcept; // since C++20
564+
void atomic_one(volatile atomic_flag* obj) noexcept; // since C++20
565+
void atomic_one(atomic_flag* obj) noexcept; // since C++20
566+
void atomic_all(volatile atomic_flag* obj) noexcept; // since C++20
567+
void atomic_all(atomic_flag* obj) noexcept; // since C++20
568568
569569
// fences
570570

libcxx/include/barrier

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace std
1717
{
1818
1919
template<class CompletionFunction = see below>
20-
class barrier
20+
class barrier // since C++20
2121
{
2222
public:
2323
using arrival_token = see below;
@@ -68,7 +68,7 @@ namespace std
6868
_LIBCPP_PUSH_MACROS
6969
# include <__undef_macros>
7070

71-
# if _LIBCPP_STD_VER >= 14
71+
# if _LIBCPP_STD_VER >= 20
7272

7373
_LIBCPP_BEGIN_NAMESPACE_STD
7474

@@ -254,7 +254,7 @@ public:
254254
# endif // !_LIBCPP_HAS_NO_TREE_BARRIER
255255

256256
template <class _CompletionF = __empty_completion>
257-
class _LIBCPP_DEPRECATED_ATOMIC_SYNC barrier {
257+
class barrier {
258258
__barrier_base<_CompletionF> __b_;
259259

260260
public:
@@ -290,7 +290,7 @@ public:
290290

291291
_LIBCPP_END_NAMESPACE_STD
292292

293-
# endif // _LIBCPP_STD_VER >= 14
293+
# endif // _LIBCPP_STD_VER >= 20
294294

295295
_LIBCPP_POP_MACROS
296296

@@ -305,4 +305,4 @@ _LIBCPP_POP_MACROS
305305
# include <variant>
306306
#endif
307307

308-
#endif //_LIBCPP_BARRIER
308+
#endif // _LIBCPP_BARRIER

0 commit comments

Comments
 (0)