Closed
Description
The note in [atomics.types.operations] p25 (N4861) contains the following code example of the effects of the compare_exchange_strong
operation:
if (memcmp(this, &expected, sizeof(*this)) == 0)
memcpy(this, &desired, sizeof(*this));
else
memcpy(expected, this, sizeof(*this));
This code is ill-formed, because expected
in the else-branch is missing a leading &
operator.
Metadata
Metadata
Assignees
Labels
No labels