P0935R0 Eradicating unnecessarily explicit default constructors
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Jun 2018 13:32:53 +0000 (14:32 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 14 Jun 2018 13:32:53 +0000 (14:32 +0100)
commit977ac63eab69884aa8d4bd317d7c1b80627d75ef
tree6ea0e682286cdb690b257cdb36d87684b415527a
parent8513bec38c903ccef49286b1dc741303f7df4761
P0935R0 Eradicating unnecessarily explicit default constructors

The param_type constructors of each random number distribution should
mirror the constructors of the distribution itself, so make the same
changes w.r.t explicit on default constructors.

* include/bits/random.h (uniform_real_distribution::param_type)
(normal_distribution::param_type, lognormal_distribution::param_type)
(gamma_distribution::param_type, chi_squared_distribution::param_type)
(cauchy_distribution::param_type, fisher_f_distribution::param_type)
(student_t_distribution::param_type)
(bernoulli_distribution::param_type)
(binomial_distribution::param_type)
(geometric_distribution::param_type)
(negative_binomial_distribution::param_type)
(poisson_distribution::param_type)
(exponential_distribution::param_type)
(weibull_distribution::param_type)
(extreme_value_distribution::param_type): Add non-explicit default
constructors. Remove default argument for first parameter of explicit
constructors.
* include/bits/uniform_int_dist.h
(uniform_int_distribution::param_type): Likewise.
* include/ext/random
(beta_distribution::param_type, rice_distribution::param_type)
(nakagami_distribution::param_type, pareto_distribution::param_type)
(k_distribution::param_type, arcsine_distribution::param_type)
(hoyt_distribution::param_type, triangular_distribution::param_type)
(von_mises_distribution::param_type)
(hypergeometric_distribution::param_type)
(logistic_distribution::param_type)
(uniform_inside_sphere_distribution::param_type): Likewise.
(uniform_on_sphere_distribution::param_type): Make default constructor
non-explicit.
* testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
Test param_type for non-explicit default constructor.
* testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/normal_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
Likewise.
* testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/normal_mv_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
* testsuite/ext/random/triangular_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
Likewise.
* testsuite/ext/random/von_mises_distribution/cons/default.cc:
Likewise.

From-SVN: r261592
38 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/uniform_int_dist.h
libstdc++-v3/include/ext/random
libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc