gcc/libstdc++-v3
Jonathan Wakely e4379a931d libstdc++: Value-initialize std::atomic for C++20 (P0883R2)
This implements the new requirements for C++20 that std::atomic should
initialize the atomic variable in its default constructor.

This patch does not add the deprecated attribute to atomic_init, but
that should be done at some point as it's deprecated in C++20.

The paper also deprecates the ATOMIC_FLAG_INIT macro, although we can't
apply the deprecated attribute to a macro.

	PR libstdc++/58605
	* include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
	Define.
	(__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
	(__atomic_float): Add default member initializer for C++20.
	* include/std/atomic (atomic): Likewise.
	(atomic::atomic()): Remove noexcept-specifier on default constructor.
	* include/std/version (__cpp_lib_atomic_value_initialization): Define.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
	number.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/value_init.cc: New test.
	* testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
	* testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
	expected result for is_trivially_default_constructible.
	* testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
	* testsuite/29_atomics/atomic_float/value_init.cc: New test.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/value_init.cc
	* testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
	expected results for is_trivially_default_constructible.
	* testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
	new test generator.
2020-01-13 13:22:28 +00:00
..
config libstdc++: Define memory resource key functions non-inline (PR93208) 2020-01-09 13:18:20 +00:00
doc rename local _C2 identifiers in stl map header files 2020-01-09 23:00:50 +00:00
include libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
libsupc++ libstdc++: Define __cpp_lib_three_way_comparison conditionally 2020-01-06 12:06:41 +00:00
po Update copyright years. 2020-01-01 12:51:42 +01:00
python Update copyright years. 2020-01-01 12:51:42 +01:00
scripts Update copyright years. 2020-01-01 12:51:42 +01:00
src libstdc++: Define memory resource key functions non-inline (PR93208) 2020-01-09 13:18:20 +00:00
testsuite libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
acinclude.m4 VxWorks has_nanosleep for libstdc++ enable-libstdcxx-time auto 2019-12-30 22:36:14 +00:00
aclocal.m4
ChangeLog libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019 libstdc++: Fix whitespace in ChangeLog-2019 2020-01-09 21:31:35 +00:00
config.h.in libstdc++: Add full steady_clock support to shared_timed_mutex 2019-12-02 16:23:10 +00:00
configure VxWorks has_nanosleep for libstdc++ enable-libstdcxx-time auto 2019-12-30 22:36:14 +00:00
configure.ac libstdc++: Add full steady_clock support to shared_timed_mutex 2019-12-02 16:23:10 +00:00
configure.host [ARM/FDPIC v6 24/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in libstdc++ configure scripts 2019-09-10 10:13:20 +02:00
crossconfig.m4 Define HAVE_ for math long double functions declared in vxworks headers 2019-12-25 06:43:22 +00:00
fragment.am
linkage.m4
Makefile.am Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.