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)
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

index 490dd247b1df03e97565d09d499b23c156d7a9e8..738b7acc8f29a448225afe3f54a151ca9d26dea6 100644 (file)
@@ -1,3 +1,95 @@
+2018-06-14  Jonathan Wakely  <jwakely@redhat.com>
+
+       P0935R0 Eradicating unnecessarily explicit 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.
+
 2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
            Jonathan Wakely  <jwakely@redhat.com>
 
index 252b14d6d11a5e7d61ef08fc233111f5c925a5b3..738c62fccd12402b204e4e5ba0715a09145cadd5 100644 (file)
@@ -1745,9 +1745,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef uniform_real_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(0) { }
+
        explicit
-       param_type(_RealType __a = _RealType(0),
-                  _RealType __b = _RealType(1))
+       param_type(_RealType __a, _RealType __b = _RealType(1))
        : _M_a(__a), _M_b(__b)
        {
          __glibcxx_assert(_M_a <= _M_b);
@@ -1974,9 +1975,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef normal_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(0.0) { }
+
        explicit
-       param_type(_RealType __mean = _RealType(0),
-                  _RealType __stddev = _RealType(1))
+       param_type(_RealType __mean, _RealType __stddev = _RealType(1))
        : _M_mean(__mean), _M_stddev(__stddev)
        {
          __glibcxx_assert(_M_stddev > _RealType(0));
@@ -2194,9 +2196,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef lognormal_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(0.0) { }
+
        explicit
-       param_type(_RealType __m = _RealType(0),
-                  _RealType __s = _RealType(1))
+       param_type(_RealType __m, _RealType __s = _RealType(1))
        : _M_m(__m), _M_s(__s)
        { }
 
@@ -2405,9 +2408,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef gamma_distribution<_RealType> distribution_type;
        friend class gamma_distribution<_RealType>;
 
+       param_type() : param_type(1.0) { }
+
        explicit
-       param_type(_RealType __alpha_val = _RealType(1),
-                  _RealType __beta_val = _RealType(1))
+       param_type(_RealType __alpha_val, _RealType __beta_val = _RealType(1))
        : _M_alpha(__alpha_val), _M_beta(__beta_val)
        {
          __glibcxx_assert(_M_alpha > _RealType(0));
@@ -2631,8 +2635,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef chi_squared_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_RealType __n = _RealType(1))
+       param_type(_RealType __n)
        : _M_n(__n)
        { }
 
@@ -2853,9 +2859,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef cauchy_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(0) { }
+
        explicit
-       param_type(_RealType __a = _RealType(0),
-                  _RealType __b = _RealType(1))
+       param_type(_RealType __a, _RealType __b = _RealType(1))
        : _M_a(__a), _M_b(__b)
        { }
 
@@ -3060,9 +3067,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef fisher_f_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_RealType __m = _RealType(1),
-                  _RealType __n = _RealType(1))
+       param_type(_RealType __m, _RealType __n = _RealType(1))
        : _M_m(__m), _M_n(__n)
        { }
 
@@ -3291,8 +3299,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef student_t_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_RealType __n = _RealType(1))
+       param_type(_RealType __n)
        : _M_n(__n)
        { }
 
@@ -3513,8 +3523,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     {
       typedef bernoulli_distribution distribution_type;
 
+      param_type() : param_type(0.5) { }
+
       explicit
-      param_type(double __p = 0.5)
+      param_type(double __p)
       : _M_p(__p)
       {
        __glibcxx_assert((_M_p >= 0.0) && (_M_p <= 1.0));
@@ -3732,8 +3744,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef binomial_distribution<_IntType> distribution_type;
        friend class binomial_distribution<_IntType>;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_IntType __t = _IntType(1), double __p = 0.5)
+       param_type(_IntType __t, double __p = 0.5)
        : _M_t(__t), _M_p(__p)
        {
          __glibcxx_assert((_M_t >= _IntType(0))
@@ -3970,8 +3984,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef geometric_distribution<_IntType> distribution_type;
        friend class geometric_distribution<_IntType>;
 
+       param_type() : param_type(0.5) { }
+
        explicit
-       param_type(double __p = 0.5)
+       param_type(double __p)
        : _M_p(__p)
        {
          __glibcxx_assert((_M_p > 0.0) && (_M_p < 1.0));
@@ -4177,8 +4193,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef negative_binomial_distribution<_IntType> distribution_type;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_IntType __k = 1, double __p = 0.5)
+       param_type(_IntType __k, double __p = 0.5)
        : _M_k(__k), _M_p(__p)
        {
          __glibcxx_assert((_M_k > 0) && (_M_p > 0.0) && (_M_p <= 1.0));
@@ -4407,8 +4425,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef poisson_distribution<_IntType> distribution_type;
        friend class poisson_distribution<_IntType>;
 
+       param_type() : param_type(1.0) { }
+
        explicit
-       param_type(double __mean = 1.0)
+       param_type(double __mean)
        : _M_mean(__mean)
        {
          __glibcxx_assert(_M_mean > 0.0);
@@ -4630,8 +4650,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef exponential_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(1.0) { }
+
        explicit
-       param_type(_RealType __lambda = _RealType(1))
+       param_type(_RealType __lambda)
        : _M_lambda(__lambda)
        {
          __glibcxx_assert(_M_lambda > _RealType(0));
@@ -4843,9 +4865,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef weibull_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(1.0) { }
+
        explicit
-       param_type(_RealType __a = _RealType(1),
-                  _RealType __b = _RealType(1))
+       param_type(_RealType __a, _RealType __b = _RealType(1.0))
        : _M_a(__a), _M_b(__b)
        { }
 
@@ -5052,9 +5075,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef extreme_value_distribution<_RealType> distribution_type;
 
+       param_type() : param_type(0.0) { }
+
        explicit
-       param_type(_RealType __a = _RealType(0),
-                  _RealType __b = _RealType(1))
+       param_type(_RealType __a, _RealType __b = _RealType(1.0))
        : _M_a(__a), _M_b(__b)
        { }
 
index 3b6d504466df9a7bf4b68fd434d24626e3f1aa4b..f339f62a6680b46c667b446fac1d9dff5c63b8ad 100644 (file)
@@ -68,9 +68,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef uniform_int_distribution<_IntType> distribution_type;
 
+       param_type() : param_type(0) { }
+
        explicit
-       param_type(_IntType __a = 0,
-                  _IntType __b = std::numeric_limits<_IntType>::max())
+       param_type(_IntType __a,
+                  _IntType __b = numeric_limits<_IntType>::max())
        : _M_a(__a), _M_b(__b)
        {
          __glibcxx_assert(_M_a <= _M_b);
@@ -108,7 +110,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        */
       explicit
       uniform_int_distribution(_IntType __a,
-                          _IntType __b = std::numeric_limits<_IntType>::max())
+                              _IntType __b = numeric_limits<_IntType>::max())
       : _M_param(__a, __b)
       { }
 
index 3c714f5672cf18b9919262fd20bc261f75100587..7b2d1eaba714aa2c4cdcbb7c36578b4212290581 100644 (file)
@@ -424,9 +424,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef beta_distribution<_RealType> distribution_type;
        friend class beta_distribution<_RealType>;
 
+       param_type() : param_type(1) { }
+
        explicit
-       param_type(_RealType __alpha_val = _RealType(1),
-                  _RealType __beta_val = _RealType(1))
+       param_type(_RealType __alpha_val, _RealType __beta_val = _RealType(1))
        : _M_alpha(__alpha_val), _M_beta(__beta_val)
        {
          __glibcxx_assert(_M_alpha > _RealType(0));
@@ -972,7 +973,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef rice_distribution<result_type> distribution_type;
 
-       param_type(result_type __nu_val = result_type(0),
+       param_type() : param_type(0) { }
+
+       param_type(result_type __nu_val,
                   result_type __sigma_val = result_type(1))
        : _M_nu(__nu_val), _M_sigma(__sigma_val)
        {
@@ -1224,7 +1227,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef nakagami_distribution<result_type> distribution_type;
 
-       param_type(result_type __mu_val = result_type(1),
+       param_type() : param_type(1) { }
+
+       param_type(result_type __mu_val,
                   result_type __omega_val = result_type(1))
        : _M_mu(__mu_val), _M_omega(__omega_val)
        {
@@ -1467,7 +1472,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef pareto_distribution<result_type> distribution_type;
 
-       param_type(result_type __alpha_val = result_type(1),
+       param_type() : param_type(1) { }
+
+       param_type(result_type __alpha_val,
                   result_type __mu_val = result_type(1))
        : _M_alpha(__alpha_val), _M_mu(__mu_val)
        {
@@ -1712,7 +1719,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef k_distribution<result_type> distribution_type;
 
-       param_type(result_type __lambda_val = result_type(1),
+       param_type() : param_type(1) { }
+
+       param_type(result_type __lambda_val,
                   result_type __mu_val = result_type(1),
                   result_type __nu_val = result_type(1))
        : _M_lambda(__lambda_val), _M_mu(__mu_val), _M_nu(__nu_val)
@@ -1964,8 +1973,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef arcsine_distribution<result_type> distribution_type;
 
-       param_type(result_type __a = result_type(0),
-                  result_type __b = result_type(1))
+       param_type() : param_type(0) { }
+
+       param_type(result_type __a, result_type __b = result_type(1))
        : _M_a(__a), _M_b(__b)
        {
          __glibcxx_assert(_M_a <= _M_b);
@@ -2210,8 +2220,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef hoyt_distribution<result_type> distribution_type;
 
-       param_type(result_type __q = result_type(0.5L),
-                  result_type __omega = result_type(1))
+       param_type() : param_type(0.5) { }
+
+       param_type(result_type __q, result_type __omega = result_type(1))
        : _M_q(__q), _M_omega(__omega)
        {
          __glibcxx_assert(_M_q > result_type(0));
@@ -2450,8 +2461,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        friend class triangular_distribution<_RealType>;
 
+       param_type() : param_type(0) { }
+
        explicit
-       param_type(_RealType __a = _RealType(0),
+       param_type(_RealType __a,
                   _RealType __b = _RealType(0.5),
                   _RealType __c = _RealType(1))
        : _M_a(__a), _M_b(__b), _M_c(__c)
@@ -2715,9 +2728,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        friend class von_mises_distribution<_RealType>;
 
+       param_type() : param_type(0) { }
+
        explicit
-       param_type(_RealType __mu = _RealType(0),
-                  _RealType __kappa = _RealType(1))
+       param_type(_RealType __mu, _RealType __kappa = _RealType(1))
        : _M_mu(__mu), _M_kappa(__kappa)
        {
          const _RealType __pi = __gnu_cxx::__math_constants<_RealType>::__pi;
@@ -2958,8 +2972,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        typedef hypergeometric_distribution<_UIntType> distribution_type;
        friend class hypergeometric_distribution<_UIntType>;
 
+       param_type() : param_type(10) { }
+
        explicit
-       param_type(result_type __N = 10, result_type __K = 5,
+       param_type(result_type __N, result_type __K = 5,
                   result_type __n = 1)
        : _M_N{__N}, _M_K{__K}, _M_n{__n}
        {
@@ -3224,8 +3240,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        typedef logistic_distribution<result_type> distribution_type;
 
-       param_type(result_type __a = result_type(0),
-                  result_type __b = result_type(1))
+       param_type() : param_type(0) { }
+
+       explicit
+       param_type(result_type __a, result_type __b = result_type(1))
        : _M_a(__a), _M_b(__b)
        {
          __glibcxx_assert(_M_b > result_type(0));
@@ -3436,9 +3454,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       /** Parameter type. */
       struct param_type
       {
-       explicit
-       param_type()
-       { }
+       param_type() { }
 
        friend bool
        operator==(const param_type&, const param_type&)
@@ -3634,8 +3650,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          = uniform_inside_sphere_distribution<_Dimen, _RealType>;
        friend class uniform_inside_sphere_distribution<_Dimen, _RealType>;
 
+       param_type() : param_type(1.0) { }
+
        explicit
-       param_type(_RealType __radius = _RealType(1))
+       param_type(_RealType __radius)
        : _M_radius(__radius)
        {
          __glibcxx_assert(_M_radius > _RealType(0));
index 42096c0fd34f95ab888b41bb156e58a952514254..2d5cb074ea358ddb4c6c939c396e6db081a8b470 100644 (file)
@@ -42,6 +42,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::bernoulli_distribution>();
+  test.operator()<std::bernoulli_distribution::param_type>();
 }
 
 int main()
index 6cf82f1b86c481a56fdb71e66944ee70b6eb48ad..b5d616e8761fd855377386301955534c9eb7fe36 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::binomial_distribution<>>();
+  test.operator()<std::binomial_distribution<>::param_type>();
 }
 
 int main()
index c1c71ce2ce796839b192ef324051edf9c4e997fd..5bcf183b3dce7e8cfe525b22721d597b52c8e2bf 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::cauchy_distribution<>>();
+  test.operator()<std::cauchy_distribution<>::param_type>();
 }
 
 int main()
index 8ecf7c0ce4ad0d9e3d39e02824b26c3a0bbb5421..bdd397f1ec8f0a137ee17adbe586ff8543defd5f 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::chi_squared_distribution<>>();
+  test.operator()<std::chi_squared_distribution<>::param_type>();
 }
 
 int main()
index 0e837ed1046a6f33e45883330b43b31b02f69e4d..909986c7ea7b2ea02d805b8585193cf9733e55c1 100644 (file)
@@ -42,6 +42,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::discrete_distribution<>>();
+  test.operator()<std::discrete_distribution<>::param_type>();
 }
 
 int main()
index 7285bd351a33b81235564d6ec5cd28de927c4d3c..0edd542a581ad37a9661ee0db9136f5e4c179306 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::exponential_distribution<>>();
+  test.operator()<std::exponential_distribution<>::param_type>();
 }
 
 int main()
index f9187fc7586ef33604d8dd98772e21f17e07e898..124ed8d69678690a873683f3a8bac00669d765da 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::extreme_value_distribution<>>();
+  test.operator()<std::extreme_value_distribution<>::param_type>();
 }
 
 int main()
index 3032adea816faf78744b70a26fd8327572c0b28c..44324eab40322fa1a1bc3812f864cbf2f51a40d2 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::fisher_f_distribution<>>();
+  test.operator()<std::fisher_f_distribution<>::param_type>();
 }
 
 int main()
index 84d2bb73502a44ed36ccc3290a9d6161420b3cab..50f59337c0a2a2880162e3952565a5d4ef3b2b18 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::gamma_distribution<>>();
+  test.operator()<std::gamma_distribution<>::param_type>();
 }
 
 int main()
index d16a2f06db2590f20dc03a88bc3cec49d1d8dc8c..a6f1244b85909fc1d7701298a8b6a1d9aef59c5b 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::geometric_distribution<>>();
+  test.operator()<std::geometric_distribution<>::param_type>();
 }
 
 int
index 5512905cf612e0af06e11fbb0dd99d644c5008da..3e6cd142d78fabf9831bdfd5719dec5cb0ad6335 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::lognormal_distribution<>>();
+  test.operator()<std::lognormal_distribution<>::param_type>();
 }
 
 int
index 32847dfe69977b452d351622222ddf18bbdee5af..8f74de953ac1b98cb614cd3758191e839ec79afd 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::negative_binomial_distribution<>>();
+  test.operator()<std::negative_binomial_distribution<>::param_type>();
 }
 
 int
index dd3e0d2165507a500fad1ba88f38fd32e501dd7c..0c2b84ecc833374bccc87c60feb16a47fa42955a 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::normal_distribution<>>();
+  test.operator()<std::normal_distribution<>::param_type>();
 }
 
 int
index 84507b45ae7cd8c3d8cf14fcab0848693ce2166a..a90f87beca88d3089e20aaed6c71cdb40f942145 100644 (file)
@@ -46,6 +46,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::piecewise_constant_distribution<>>();
+  test.operator()<std::piecewise_constant_distribution<>::param_type>();
 }
 
 int
index e439adf2a3f915a19702e6c477a9998fce4baeb8..7db4e3f031368e2b982c60425914abcacc3fc9c9 100644 (file)
@@ -47,6 +47,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::piecewise_linear_distribution<>>();
+  test.operator()<std::piecewise_linear_distribution<>::param_type>();
 }
 
 int
index c357581785ee826b637882841d3cf995013d5ec7..82b6a1cd1c1402d7c5097927b47ade3019bc3729 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::poisson_distribution<>>();
+  test.operator()<std::poisson_distribution<>::param_type>();
 }
 
 int
index 06c7deef0949c8617b567834f99ac525a08b043c..9bdba65984c2f7ac20750199668fb301a93401f2 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::student_t_distribution<>>();
+  test.operator()<std::student_t_distribution<>::param_type>();
 }
 
 int
index 8774e660e59a930475695802fd8e89714ecad219..0774a147f7e86ff7854333cdc675a1145bd1ced7 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::uniform_int_distribution<>>();
+  test.operator()<std::uniform_int_distribution<>::param_type>();
 }
 
 int
index 6a47a4dc47362f907428830047f9942aaaf2e4d0..85a697f73a6fc57a994fabdde2a4a2c2580be0f8 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::uniform_real_distribution<>>();
+  test.operator()<std::uniform_real_distribution<>::param_type>();
 }
 
 int
index 96db58f2ca60ff790b0c5b3e4cf7c7559348bc06..4bb2fb72eba4070dcfab9a0c9ea5b9c332d5a11e 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::weibull_distribution<>>();
+  test.operator()<std::weibull_distribution<>::param_type>();
 }
 
 int
index 76b5166caf59f4527d958849e3ff7483f6e283b1..fc06991fa93ed60c550ec695c0bd6c388d2de42d 100644 (file)
@@ -39,6 +39,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::arcsine_distribution<>>();
+  test.operator()<__gnu_cxx::arcsine_distribution<>::param_type>();
 }
 
 int
index 9675a557a9a2279856bf8da95751c1998dadc224..3514796ba7eeb73dcab53507c0fe13a091fe58f4 100644 (file)
@@ -40,6 +40,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::beta_distribution<>>();
+  test.operator()<__gnu_cxx::beta_distribution<>::param_type>();
 }
 
 int main()
index 53022345aea1a55927a304faa9ef2c951bc99065..1e11a90a811792afac6196860d4a68f80ca263b5 100644 (file)
@@ -40,6 +40,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::hoyt_distribution<>>();
+  test.operator()<__gnu_cxx::hoyt_distribution<>::param_type>();
 }
 
 int
index d4078d4df37693155c80432fb53f2d0ab13c0a46..06d9432f27e49531f22a54a6feb09fdc49008956 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::hypergeometric_distribution<>>();
+  test.operator()<__gnu_cxx::hypergeometric_distribution<>::param_type>();
 }
 
 int
index cc11ccb27018f95c70f4688626bff5dd94860d3c..f6677c78216e3460969bc16f76458f01c0eca5dc 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::k_distribution<>>();
+  test.operator()<__gnu_cxx::k_distribution<>::param_type>();
 }
 
 int
index 3d7db75524d57427bb8d76a4519e252e4519f2ca..d66d76ad1f727ab6bf71ccacd16dd6e6386e7e02 100644 (file)
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::logistic_distribution<>>();
+  test.operator()<__gnu_cxx::logistic_distribution<>::param_type>();
 }
 
 int
index ea473f2fca5faf01366df3ec85baeeb8413fb8da..8c4159706bf8bb9f6e66c7b984bde85e733e5021 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::nakagami_distribution<>>();
+  test.operator()<__gnu_cxx::nakagami_distribution<>::param_type>();
 }
 
 int
index c209a8d89dcca264ca8136ba75368d7057031553..828c298e42b46e7092e98e5eab3880e0010bf045 100644 (file)
@@ -46,6 +46,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::normal_mv_distribution<2>>();
+  test.operator()<__gnu_cxx::normal_mv_distribution<2>::param_type>();
 }
 
 int main()
index 368d7da19101319c36ca1898276c537242659a74..440eefa00fbda01ef61825c92398d42cea58d8ea 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::pareto_distribution<>>();
+  test.operator()<__gnu_cxx::pareto_distribution<>::param_type>();
 }
 
 int
index 1483f87000a6ae52e9a98bb4289c8dd511ef58ed..014bcd5042bfccba731ce273bb1b2c34e7b56d04 100644 (file)
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::rice_distribution<>>();
+  test.operator()<__gnu_cxx::rice_distribution<>::param_type>();
 }
 
 int
index c7c6aba59364d12c0f4a77d295efa917a09bce9d..1726a828048b30ec59b3a4163adeeaee639ab2d7 100644 (file)
@@ -41,6 +41,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::triangular_distribution<>>();
+  test.operator()<__gnu_cxx::triangular_distribution<>::param_type>();
 }
 
 int main()
index e15a12d79ae43e46c432398c0a9387afc457a8b2..6b2f579360528f938905a3f934180600bf7b8b07 100644 (file)
@@ -41,6 +41,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::uniform_inside_sphere_distribution<2>>();
+  test.operator()<__gnu_cxx::uniform_inside_sphere_distribution<2>::param_type>();
 }
 
 int
index 8aa81b328a2417742ea3a4bb75632d85f5c89fb0..95e1783832ba2f825c3124916023ffc78317b373 100644 (file)
@@ -40,6 +40,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::uniform_on_sphere_distribution<2>>();
+  test.operator()<__gnu_cxx::uniform_on_sphere_distribution<2>::param_type>();
 }
 
 int
index 1a4784d49d9bd649be603a512e648c8d31d89e8a..7e17f4da23f31513b709fb29ac633014b1b41083 100644 (file)
@@ -40,6 +40,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<__gnu_cxx::von_mises_distribution<>>();
+  test.operator()<__gnu_cxx::von_mises_distribution<>::param_type>();
 }
 
 int main()