While looking at the review comments in D103765 there was an oddity in
the tests for the following functions:
- atomic_fetch_add
- atomic_fetch_add_explicit
- atomic_fetch_sub
- atomic_fetch_sub_explicit
Libc++ allows usage of
atomic_fetch_add<int>(atomic<int*>*, atomic<int*>::difference_type);
MSVC and GCC reject this code: https://godbolt.org/z/9d8WzohbE
This makes the atomic fetch(add|sub).* Standard conforming and removes the non-conforming extensions.
Fixes PR47908
Here and on line 68, I strongly recommend removing the sentence This isn't allowed by the Standard.. I mean, we wouldn't make the change if it weren't allowed, right?
I think what you meant is The old behavior wasn't conforming; the new behavior is (more) conforming. But we don't need to say that either; those who trust their library vendor will assume that the change moves in the right direction (not the wrong direction), and those who don't trust, can just go read the Standard themselves if they want some kind of rationale for why we're suddenly implementing the Standard behavior.