[PATCH] PR69301 don't assume atomic<T> can default construct T

Jonathan Wakely jwakely@redhat.com
Wed Jan 18 18:37:00 GMT 2017


This fixes an invalid assumption that std::atomic<T> can default
construct a T. It also fixes some variables called "tmp" with
non-uglified names.

	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.

Tested powerpc64le-linux, committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 5419 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170118/b199540c/attachment.bin>


More information about the Libstdc++ mailing list