-
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
<atomic>
: Add member difference_type
to atomic<void*>
and its friends
#4689
<atomic>
: Add member difference_type
to atomic<void*>
and its friends
#4689
Conversation
cf53dba
to
70cae8c
Compare
It seems intentional that `atomic(_ref)<T*>` are SFINAE-friendly on atomic pointer arithmetic. So this PR adds another mediate base class to avoid breaking the SFINAE-friendliness. Also updates the comments in `Dev11_0863628_atomic_compare_exchange/test.cpp` to cite WG21-N4981.
53d9258
to
1cb0715
Compare
I don't think that matches the standard, which uses "Mandates" ([atomics.types.pointer]/5, [atomics.ref.pointer]/3). |
Mandates doesn't mean the ill-formedness shall be SFINAE-unfriendly, although we ususally use Previously, #4014 made Mandates for Edit: see also #3013 (comment). |
Thanks for the quick fix and comprehensive test coverage, this is great! 😻 |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for making a difference! 😹 🤪 💚 |
Fixes #4688.
It seems intentional that
atomic(_ref)<T*>
are SFINAE-friendly on atomic pointer arithmetic. So this PR adds another mediate base class to avoid breaking the SFINAE-friendliness.Also updates the comments in
Dev11_0863628_atomic_compare_exchange/test.cpp
to cite WG21-N4981.