-
Notifications
You must be signed in to change notification settings - Fork 15k
[libc++] cv-qualified types in atomic and atomic_ref (P3323R1) #121414
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
base: main
Are you sure you want to change the base?
Changes from all commits
5afe474
fc886c3
69d92fa
9c6dd66
1077d03
28a0107
26013d0
ffdda72
1b24aeb
a2f7780
9ec6b04
d878901
f350f7f
b156123
e0fd1a2
0b96b4c
dcbee5b
232a8a5
d84ec1f
afe849f
b8a4edc
94ee424
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,7 +86,7 @@ | |||||
| "`P3050R2 <https://wg21.link/P3050R2>`__","Fix C++26 by optimizing ``linalg::conjugated`` for noncomplex value types","2024-11 (Wrocław)","","","" | ||||||
dalg24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| "`P3396R1 <https://wg21.link/P3396R1>`__","``std::execution`` wording fixes","2024-11 (Wrocław)","","","" | ||||||
| "`P2835R7 <https://wg21.link/P2835R7>`__","Expose ``std::atomic_ref``'s object address","2024-11 (Wrocław)","","","" | ||||||
| "`P3323R1 <https://wg21.link/P3323R1>`__","cv-qualified types in ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","","","" | ||||||
| "`P3323R1 <https://wg21.link/P3323R1>`__","cv-qualified types in ``atomic`` and ``atomic_ref``","2024-11 (Wrocław)","|Complete|","21","Implemented as DR against C++20." | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. Although I'll be happier if we can land this in LLVM 21.x.
Suggested change
|
||||||
| "`P3508R0 <https://wg21.link/P3508R0>`__","Wording for ""constexpr for specialized memory algorithms""","2024-11 (Wrocław)","","","" | ||||||
| "`P3369R0 <https://wg21.link/P3369R0>`__","constexpr for ``uninitialized_default_construct``","2024-11 (Wrocław)","","","" | ||||||
| "`P3370R1 <https://wg21.link/P3370R1>`__","Add new library headers from C23","2024-11 (Wrocław)","","","" | ||||||
|
|
||||||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ | |
| #define _LIBCPP___ATOMIC_SUPPORT_H | ||
|
|
||
| #include <__config> | ||
| #include <__type_traits/is_const.h> | ||
| #include <__type_traits/is_volatile.h> | ||
|
|
||
| #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | ||
| # pragma GCC system_header | ||
|
|
@@ -112,6 +114,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD | |
|
|
||
| template <typename _Tp, typename _Base = __cxx_atomic_base_impl<_Tp> > | ||
| struct __cxx_atomic_impl : public _Base { | ||
| static_assert(!is_const<_Tp>::value && !is_volatile<_Tp>::value, | ||
| "std::atomic<T> requires that 'T' be a cv-unqualified type"); | ||
|
Comment on lines
+117
to
+118
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should move the |
||
|
|
||
| _LIBCPP_HIDE_FROM_ABI __cxx_atomic_impl() _NOEXCEPT = default; | ||
| _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT : _Base(__value) {} | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should retarget this to
22.rst.