gcc/libstdc++-v3/testsuite/23_containers
Jonathan Wakely 08abbddaaa PR libstdc++/89477 constrain deduction guides for maps and sets
The Compare, Hash, and Pred template parameters should be constrained in
the C++17 deduction guides for associative and unordered containers.

The deduction guides for stack, queue and priority_queue are already
constrained, but this patch makes them use the _RequireNotAllocator
helper instead of reproducing the logic each time.

	PR libstdc++/89477
	* include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
	container deduction guides.
	* include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
	* include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
	parameters in deduction guides.
	* include/bits/stl_multimap.h (multimap): Likewise.
	* include/bits/stl_multiset.h (multiset): Likewise.
	* include/bits/stl_queue.h (queue, priority_queue): Likewise.
	* include/bits/stl_set.h (set): Likewise.
	* include/bits/stl_stack.h (stack): Likewise.
	* include/bits/unordered_map.h (unordered_map, unordered_multimap):
	use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
	constrain parameters in deduction guides.
	* include/bits/unordered_set.h (unordered_set, unordered_multiset):
	Likewise.
	* testsuite/23_containers/map/cons/deduction.cc: Test additional
	deduction cases.
	* testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
	* testsuite/23_containers/set/cons/deduction.cc: Likewise.
	* testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/cons/deduction.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/cons/deduction.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.

From-SVN: r269234
2019-02-26 23:12:44 +00:00
..
array Update copyright years. 2019-01-01 13:31:55 +01:00
bitset Update copyright years. 2019-01-01 13:31:55 +01:00
deque Define __cpp_lib_erase_if feature test macro 2019-01-10 13:49:31 +00:00
forward_list Define __cpp_lib_erase_if feature test macro 2019-01-10 13:49:31 +00:00
headers Update copyright years. 2019-01-01 13:31:55 +01:00
list Define __cpp_lib_erase_if feature test macro 2019-01-10 13:49:31 +00:00
map PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
multimap Add more testcases for class template argument deduction of maps 2019-01-02 16:30:49 +00:00
multiset PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
priority_queue LWG 2537 fix priority_queue constructors to establish invariant 2019-02-14 14:10:19 +00:00
queue PR libstdc++/89128 add deduction guides for container adaptors 2019-02-05 22:58:22 +00:00
set PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
stack PR libstdc++/89128 add deduction guides for container adaptors 2019-02-05 22:58:22 +00:00
unordered_map PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
unordered_multimap PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
unordered_multiset PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
unordered_set PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
vector PR libstdc++/89416 fix __is_move_insertable trait 2019-02-21 20:47:43 +00:00