atomic_base.h
50.2 KB
-
libstdc++: Strip cv-qualifiers in std::atomic<FP> (PR 95282) · 161fb9df
This squashes two commits, r11-674 and r11-1401. PR libstdc++/95282 * include/bits/atomic_base.h (__atomic_impl::load): Add const-qualifier to parameter so that _Tp is deduced as the non-const type, and use _Val to get the unqualified type. (__atomic_impl::exchange): Use the _Val alias to remove volatile from the reinterpret_cast result type. * testsuite/29_atomics/atomic_float/95282.cc: New test. (cherry picked from commit e40b11a91cb345db1324c3cb8f75b01e28056693)
Jonathan Wakely committed