gcc/libstdc++-v3/testsuite
Jonathan Wakely 75c6a925da Revert ABI changes to std::allocator in C++20
The recent C++20 changes to remove the std::allocator<void> explicit
specialization and the destructor in the std::allocator primary template
change the result of some is_trivially_xxx type traits. To avoid those
changes, this patch restores the explicit specialization and the
destructor.

In order to meet the C++20 requirements the std::allocator<void>
explicit specialization must provide the same interface as the primary
template (except for the unusable allocate and deallocate member
functions) and the destructor in the primary template must be constexpr.

	* include/bits/allocator.h (allocator<void>): Restore the explicit
	specialization for C++20, but make its API consistent with the primary
	template.
	(allocator::~allocator()): Restore the destructor for C++20, but make
	it constexpr.
	* testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
	* testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
	* testsuite/20_util/allocator/void.cc: Check that constructors and
	destructors are trivial. Check for converting constructor in C++20.
	* testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
	dejagnu target selector.
	* testsuite/ext/new_allocator/variadic_construct.cc: Likewise.

From-SVN: r277410
2019-10-24 16:29:41 +01:00
..
17_intro Do not declare std::uses_allocator before C++11 2019-10-22 22:48:53 +01:00
18_support
19_diagnostics
20_util Revert ABI changes to std::allocator in C++20 2019-10-24 16:29:41 +01:00
21_strings
22_locale
23_containers PR c++/91369 Implement P0784R7 changes to allocation and construction 2019-10-23 18:42:11 +01:00
24_iterators
25_algorithms Add std::copy_n istreambuf_iterator specialization 2019-10-06 15:29:04 +00:00
26_numerics Define std::uniform_random_bit_generator concept for C++20 2019-10-24 10:35:07 +01:00
27_io
28_regex Implement LWG 3296 for basic_regex::assign 2019-09-25 13:31:53 +01:00
29_atomics
30_threads
abi
backward Adjust extension types to use allocator_traits 2019-10-23 17:14:28 +01:00
config
data
decimal
experimental
ext Revert ABI changes to std::allocator in C++20 2019-10-24 16:29:41 +01:00
lib
libstdc++-abi
libstdc++-dg Implement <concepts> header for C++20 2019-10-11 16:53:52 +01:00
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions libstdc++ testsuite, silence a FreeBSD libm warning 2019-09-30 22:23:02 +02:00
std/concepts PR libstdc++/88338 Implement P0898R3, C++20 concepts library 2019-10-24 10:47:25 +01:00
tr1 Adjust extension types to use allocator_traits 2019-10-23 17:14:28 +01:00
tr2 PR libstdc++/92059 fix several bugs in tr2::dynamic_bitset 2019-10-11 16:29:55 +01:00
util Restore use of tr1::unordered_map in testsuite 2019-10-22 22:48:57 +01:00
Makefile.am
Makefile.in