[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 21:18:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69301
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Feb 14 21:17:29 2017
New Revision: 245457
URL: https://gcc.gnu.org/viewcvs?rev=245457&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/ext/pointer.h (_Pointer_adapter::operator++(int))
(_Pointer_adapter::operator--(int)): Likewise.
Added:
branches/gcc-5-branch/libstdc++-v3/testsuite/29_atomics/atomic/69301.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/ext/pointer.h
branches/gcc-5-branch/libstdc++-v3/include/std/atomic
More information about the Gcc-bugs
mailing list