[Bug libstdc++/69301] std::atomic<T>::load() won't compile if T doesn't have a default constructor
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 14 20:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69301
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Feb 14 20:07:54 2017
New Revision: 245450
URL: https://gcc.gnu.org/viewcvs?rev=245450&root=gcc&view=rev
Log:
PR69301 don't assume atomic<T> can default construct T
Backport from mainline
2017-01-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/69301
* include/std/atomic (atomic<T>::load, atomic<T>::exchange): Use
aligned buffer instead of default-initialized variable.
* testsuite/29_atomics/atomic/69301.cc: New test.
* include/experimental/memory (observer_ptr::release): Use reserved
name.
* include/ext/pointer.h (_Pointer_adapter::operator++(int))
(_Pointer_adapter::operator--(int)): Likewise.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/29_atomics/atomic/69301.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/experimental/memory
branches/gcc-6-branch/libstdc++-v3/include/ext/pointer.h
branches/gcc-6-branch/libstdc++-v3/include/std/atomic
More information about the Gcc-bugs
mailing list