<atomic>
: ADL-proof implementation of atomic
and atomic_ref
#4221
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards #140.
(A little number of
atomic
-related changes were already done in #4138.)Notes:
__builtin_zero_non_value_bits
is qualified due to a bug of MSVC (which was originally reported as DevCom-10527599, but soon considered as a duplicate of DevCom-10456452); other intrinsics are not qualified._Atomic_address_as
doesn't need to be qualified in some specializations because the passed argument is always an integer. There's a separated commit making_STD
-qualification for_Atomic_address_as
consistent._Check_memory_order
,_Check_store_memory_order
, and_Check_load_memory_order
are not qualified because the passed argument is always eitherunsigned int
ormemory_order
. I'm not sure whether it would be better to qualify them.