mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-26 04:25:51 +08:00
174f9257a7
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> |
||
---|---|---|
.. | ||
bernoulli_distribution | ||
binomial_distribution | ||
cauchy_distribution | ||
chi_squared_distribution | ||
discard_block_engine | ||
discrete_distribution | ||
exponential_distribution | ||
extreme_value_distribution | ||
fisher_f_distribution | ||
gamma_distribution | ||
geometric_distribution | ||
independent_bits_engine | ||
linear_congruential_engine | ||
lognormal_distribution | ||
mersenne_twister_engine | ||
negative_binomial_distribution | ||
normal_distribution | ||
piecewise_constant_distribution | ||
piecewise_linear_distribution | ||
poisson_distribution | ||
random_device | ||
seed_seq | ||
shuffle_order_engine | ||
student_t_distribution | ||
subtract_with_carry_engine | ||
uniform_int_distribution | ||
uniform_real_distribution | ||
weibull_distribution | ||
concept.cc | ||
default_random_engine.cc | ||
knuth_b.cc | ||
minstd_rand0.cc | ||
minstd_rand.cc | ||
mt19937_64.cc | ||
mt19937.cc | ||
pr60037-neg.cc | ||
ranlux24_base.cc | ||
ranlux24.cc | ||
ranlux48_base.cc | ||
ranlux48.cc |