gcc/libstdc++-v3/testsuite/util
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
..
common_type Update copyright years. 2020-01-01 12:51:42 +01:00
debug Update copyright years. 2020-01-01 12:51:42 +01:00
exception Update copyright years. 2020-01-01 12:51:42 +01:00
hash_fn Update copyright years. 2020-01-01 12:51:42 +01:00
io Update copyright years. 2020-01-01 12:51:42 +01:00
native_type Update copyright years. 2020-01-01 12:51:42 +01:00
performance Update copyright years. 2020-01-01 12:51:42 +01:00
pstl Synchronize libstdc++ PSTL with upstream LLVM PSTL 2019-06-07 22:01:16 +00:00
regression Update copyright years. 2020-01-01 12:51:42 +01:00
statistic Update copyright years. 2020-01-01 12:51:42 +01:00
thread Update copyright years. 2020-01-01 12:51:42 +01:00
replacement_memory_operators.h Update copyright years. 2020-01-01 12:51:42 +01:00
slow_clock.h Update copyright years. 2020-01-01 12:51:42 +01:00
specfun_testcase.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_abi_check.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_abi.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_abi.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_allocator.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_allocator.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_api.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_character.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_character.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_common_types.h libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
testsuite_container_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_containergen.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_containers.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_counter_type.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_error.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_fs.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_greedy_ops.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_hooks.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_hooks.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_io.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_iterators.h libstdc++: Improve comment about testsuite utilities 2020-01-10 22:10:48 +00:00
testsuite_new_operators.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_performance.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_random.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_regex.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_rng.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_rvalref.h Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_shared.cc Update copyright years. 2020-01-01 12:51:42 +01:00
testsuite_tr1.h Update copyright years. 2020-01-01 12:51:42 +01:00