-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement LWG-4169 std::atomic<T>
's default constructor should be constrained
#5128
Conversation
Yes, this change shouldn't be conditioned on language mode. |
Also avoid inheriting constructors and additional copy. This reverts commit e682b08.
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.
Not content to leave well enough alone, I've pushed a commit to replace the conditional_t<is_reference_v<_Ty>, _Ty, const _TVal&>
parameter type of the _Atomic_storage
converting constructors to const _Ty&
. They are the same type when _Ty
is not an rvalue reference.
These are overkill. The constructors are ill-formed if `_Ty` is an rvalue reference type, and they were ill-formed before the latest change to the parameter types.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
☢️ 👷 🪄 |
Fixes #5123.
Perhaps this should be backported to old modes as we backported WG21-P0883R2.