gcc/libstdc++-v3/testsuite
François Dumont 6dcf042368 libstdc++: Do not over-size hashtable buckets on range insertion
We used to consider range size on insertion but on unique keys container
not all range values might be inserted resulting in over-sizing. In this
case we just consider user reservation and if none then the container will
adapt to actually inserted elements.

libstdc++-v3/ChangeLog:

	* include/bits/hashtable.h
	(_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
	const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
	const allocator_type&, true_type)): New.
	(_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
	const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
	const allocator_type&, false_type)): New.
	(_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
	const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
	const allocator_type&)): Delegate to latters.
	(operator=(initializer_list<value_type>)): Rehash if too small.
	(_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
	size_t len parameter.
	* include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
	Do not try to get input range distance.
	* testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
	* testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
2020-07-28 14:37:16 +02:00
..
17_intro
18_support libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
19_diagnostics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
20_util libstdc++: Make std::from_chars always round to nearest 2020-07-27 15:51:24 +01:00
21_strings Adjust text of expected warnings changed in PR c++/86568. 2020-07-01 08:33:29 -06:00
22_locale
23_containers libstdc++: Do not over-size hashtable buckets on range insertion 2020-07-28 14:37:16 +02:00
24_iterators libstdc++: Constrain reverse_iterator and move_iterator conversions [LWG 3435] 2020-07-22 15:10:29 +01:00
25_algorithms libstdc++: Fix some ranges algos optimizations [PR95578] 2020-06-10 17:37:53 -04:00
26_numerics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
27_io libstdc++: Avoid overflow in istream::get(streambuf&) [LWG 3464] 2020-07-20 20:06:46 +01:00
28_regex libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
29_atomics libstdc++: Require c++98_only effective target for some tests 2020-07-02 21:27:12 +01:00
30_threads libstdc++: Add static assertions to futures and promises [LWG 3458] 2020-07-22 20:11:00 +01:00
abi
backward
config
data
decimal
experimental PR libstdc++/95915 2020-06-29 00:36:38 +03:00
ext
lib
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions
std libstdc++: Fix view adaptors for mixed-const sentinels and iterators (PR 95322) 2020-05-27 22:08:15 +01:00
tr1
tr2
util libstdc++: Add std::from_chars for floating-point types 2020-07-20 23:49:27 +01:00
Makefile.am libstdc++: Enable simple invocation of runtest in testsuite 2020-05-21 14:16:19 +01:00
Makefile.in libstdc++: Regenerate makefiles 2020-06-23 07:59:40 +01:00