Instead of duplicating the initialization functions that take string, add a new member taking a raw pointer that can be used to convert the constructor token from the old string to the new. Also fix "mt19337" typos in a testcase. * include/bits/random.h (random_device::_M_init(const char*, size_t)): Add new private member function. * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&)) (random_device::_M_init_pretr1(const string&)): Call new private member with string data. * src/c++11/random.cc (random_device::_M_init(const char*, size_t)): Define. * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New test using COW strings. * testsuite/26_numerics/random/random_device/cons/default.cc: Generate a value from the device. * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise. Fix typo in token string. From-SVN: r271805 |
||
---|---|---|
.. | ||
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 | ||
default_random_engine.cc | ||
knuth_b.cc | ||
minstd_rand.cc | ||
minstd_rand0.cc | ||
mt19937.cc | ||
mt19937_64.cc | ||
pr60037-neg.cc | ||
ranlux24.cc | ||
ranlux24_base.cc | ||
ranlux48.cc | ||
ranlux48_base.cc |