[Bug libstdc++/105934] [9/10/11/12/13 Regression] C++11 pointer versions of atomic_fetch_add missing because of P0558
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 13 11:53:52 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105934
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |8.5.0
Known to fail| |10.3.0, 11.2.0, 12.0, 9.1.0
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I've raised this for discussion with LWG.
FWIW libc++ and MSVC reject the example too. It looks like everybody treats
P0558 as a DR.
It's valid as C++11 and C++17, with old and new implementations, if changed to
use std::atomic_fetch_add(static_cast<std::atomic<int*>*>(*ap), 1); }
i.e. using an explicit conversion instead of an explicit template argument
list.
More information about the Gcc-bugs
mailing list