gcc/libstdc++-v3/include
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
..
backward Fix after P0600. 2019-01-21 11:47:30 +00:00
bits PR libstdc++/89477 constrain deduction guides for maps and sets 2019-02-26 23:12:44 +00:00
c Update copyright years. 2019-01-01 13:31:55 +01:00
c_compatibility Update copyright years. 2019-01-01 13:31:55 +01:00
c_global P0482R5 char8_t: Standard library support 2019-02-19 02:54:42 +00:00
c_std Update copyright years. 2019-01-01 13:31:55 +01:00
debug Fix after P0600. 2019-01-21 11:47:30 +00:00
decimal Update copyright years. 2019-01-01 13:31:55 +01:00
experimental P0482R5 char8_t: Standard library support 2019-02-19 02:54:42 +00:00
ext Disambiguate __gnu_cxx::append_ partial specialization 2019-02-22 01:15:58 +00:00
parallel PR libstdc++/88607 replace or remove unnecessary UTF-8 characters 2019-01-03 20:38:11 +00:00
precompiled Update copyright years. 2019-01-01 13:31:55 +01:00
profile Fix after P0600. 2019-01-21 11:47:30 +00:00
std P0340R2 Making std::underlying_type SFINAE-friendly 2019-02-23 21:19:00 +00:00
tr1 Fix after P0600. 2019-01-21 11:47:30 +00:00
tr2 Fix after P0600. 2019-01-21 11:47:30 +00:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in Implement uniform container erasure for C++20. 2018-11-28 16:44:25 +00:00