gcc/libstdc++-v3/testsuite
Jonathan Wakely ebaf365963 Enforce allocator::value_type consistency for containers in C++2a
In previous standards it is undefined for a container and its allocator
to have a different value_type. Libstdc++ has traditionally allowed it
as an extension, automatically rebinding the allocator to the
container's value_type. Since GCC 8.1 that extension has been disabled
for C++11 and later when __STRICT_ANSI__ is defined (i.e. for
-std=c++11, -std=c++14, -std=c++17 and -std=c++2a).

Since the acceptance of P1463R1 into the C++2a draft an incorrect
allocator::value_type now requires a diagnostic. This patch implements
that by enabling the static_assert for -std=gnu++2a as well.

	* doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
	* include/bits/forward_list.h [__cplusplus > 201703]: Enable
	allocator::value_type assertion for C++2a.
	* include/bits/hashtable.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/stl_list.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* testsuite/23_containers/deque/48101-3_neg.cc: New test.
	* testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
	* testsuite/23_containers/list/48101-3_neg.cc: New test.
	* testsuite/23_containers/map/48101-3_neg.cc: New test.
	* testsuite/23_containers/multimap/48101-3_neg.cc: New test.
	* testsuite/23_containers/multiset/48101-3_neg.cc: New test.
	* testsuite/23_containers/set/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
	* testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
	* testsuite/23_containers/vector/48101-3_neg.cc: New test.

From-SVN: r271866
2019-06-03 14:22:59 +01:00
..
17_intro Fix failing tests for use of non-reserved names 2019-05-20 15:38:21 +01:00
18_support PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0) 2019-05-31 11:35:11 +01:00
19_diagnostics Add test for std::hash<std::error_code> 2019-05-07 16:30:29 +01:00
20_util PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
21_strings LWG2788 basic_string spurious use of a default constructible allocator 2019-05-30 20:48:48 +01:00
22_locale P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
23_containers Enforce allocator::value_type consistency for containers in C++2a 2019-06-03 14:22:59 +01:00
24_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
25_algorithms Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
26_numerics Fix random_device to work with COW strings again 2019-05-31 11:34:53 +01:00
27_io PR libstdc++/88881 fix filesystem::symlink_status for Windows 2019-05-29 23:00:53 +01:00
28_regex PR libstdc++/89023 fix test that fails when <omp.h> not available 2019-02-11 12:56:59 +00:00
29_atomics Change test to use const variables instead of macros 2019-03-11 13:46:09 +00:00
30_threads LWG 2921 remove packaged_task constructors taking allocators 2019-05-23 22:40:56 +01:00
abi Update copyright years. 2019-01-01 13:31:55 +01:00
backward Update copyright years. 2019-01-01 13:31:55 +01:00
config Update copyright years. 2019-01-01 13:31:55 +01:00
data
decimal Update copyright years. 2019-01-01 13:31:55 +01:00
experimental PR libstdc++/90634 reduce allocations in filesystem::path construction 2019-05-28 20:39:48 +01:00
ext Remove obsolete Solaris 10 support 2019-05-14 17:17:23 +00:00
lib PR libstdc++/90252 fix effective-target check for TBB 2019-05-21 14:50:41 +01:00
libstdc++-abi Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-dg Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-prettyprinters Add __gnu_test::NullablePointer utility to testsuite 2019-05-14 12:17:23 +01:00
libstdc++-xmethods Update copyright years. 2019-01-01 13:31:55 +01:00
performance Update copyright years. 2019-01-01 13:31:55 +01:00
special_functions PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr1 PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr2 Update copyright years. 2019-01-01 13:31:55 +01:00
util PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
Makefile.am Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
Makefile.in Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00