gcc/libstdc++-v3/testsuite/26_numerics
Antony Polukhin 174f9257a7 libstdc++: Optimize std::seed_seq construction
When std::seed_seq is constructed from random access iterators we can
detect the internal vector size in O(1). Reserving memory for elements
in such cases may avoid multiple memory allocations.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
	if distance is O(1).
	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
	line number.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
2021-08-17 16:53:19 +01:00
..
accumulate Update copyright years. 2021-01-04 10:26:59 +01:00
adjacent_difference Update copyright years. 2021-01-04 10:26:59 +01:00
bit Update copyright years. 2021-01-04 10:26:59 +01:00
complex Update copyright years. 2021-01-04 10:26:59 +01:00
endian Update copyright years. 2021-01-04 10:26:59 +01:00
exclusive_scan libstdc++: Remove redundant -std=gnu++17 option from algorithm tests 2021-05-10 16:22:54 +01:00
gcd libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
headers libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
inclusive_scan libstdc++: Remove redundant -std=gnu++17 option from algorithm tests 2021-05-10 16:22:54 +01:00
inner_product Update copyright years. 2021-01-04 10:26:59 +01:00
iota Update copyright years. 2021-01-04 10:26:59 +01:00
lcm libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
lerp libstdc++: Add additional overload of std::lerp [PR101870] 2021-08-12 19:46:16 +01:00
midpoint libstdc++: Make some #error strings consistent with other tests 2021-08-12 19:46:16 +01:00
numbers Update copyright years. 2021-01-04 10:26:59 +01:00
partial_sum Update copyright years. 2021-01-04 10:26:59 +01:00
pstl/numeric_ops libstdc++: Remove redundant -std=gnu++17 options from PSTL tests 2021-05-10 16:22:53 +01:00
random libstdc++: Optimize std::seed_seq construction 2021-08-17 16:53:19 +01:00
reduce libstdc++: Replace incorrect static assertion in std::reduce [PR95833] 2021-06-18 14:46:58 +01:00
slice Update copyright years. 2021-01-04 10:26:59 +01:00
slice_array Update copyright years. 2021-01-04 10:26:59 +01:00
transform_exclusive_scan libstdc++: Remove redundant -std=gnu++17 option from algorithm tests 2021-05-10 16:22:54 +01:00
transform_inclusive_scan libstdc++: Remove redundant -std=gnu++17 option from algorithm tests 2021-05-10 16:22:54 +01:00
transform_reduce libstdc++: Remove redundant -std=gnu++17 option from algorithm tests 2021-05-10 16:22:54 +01:00
valarray libstdc++: Add [[nodiscard]] to iterators and related utilities 2021-08-04 12:54:28 +01:00