P0935R0 Eradicating unnecessarily explicit default constructors

Message ID 20180612191036.GA3342@redhat.com
State New
Headers show
Series
  • P0935R0 Eradicating unnecessarily explicit default constructors
Related show

Commit Message

Jonathan Wakely June 12, 2018, 7:10 p.m.
Explicit default constructors are problematic, so this change removes
them from <random> and <ext/random>, as per P0935R0.

	* include/bits/random.h (linear_congruential_engine)
	(mersenne_twister_engine, subtract_with_carry_engine, random_device)
	(uniform_real_distribution, normal_distribution)
	(lognormal_distribution, gamma_distribution, chi_squared_distribution)
	(cauchy_distribution, fisher_f_distribution, student_t_distribution)
	(bernoulli_distribution, binomial_distribution,geometric_distribution)
	(negative_binomial_distribution, exponential_distribution)
	(weibull_distribution, extreme_value_distribution): Add non-explicit
	default constructors. Remove default argument for first parameter of
	explicit constructors.
	(piecewise_constant_distribution, piecewise_linear_distribution):
	Make default constructor non-explicit.
	* include/bits/uniform_int_dist.h (uniform_int_distribution): Add
	non-explicit default constructors. Remove default argument for first
	parameter of explicit constructor.
	(simd_fast_mersenne_twister_engine, beta_distribution)
	(rice_distribution, nakagami_distribution, pareto_distribution)
	(k_distribution, arcsine_distribution, hoyt_distribution)
	(triangular_distribution, von_mises_distribution)
	(hypergeometric_distribution, logistic_distribution)
	(uniform_inside_sphere_distribution): Likewise.
	(uniform_on_sphere_distribution): Make default constructor
	non-explicit.
	* testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
	Test for non-explicit default constructor. Fix references to standard.
	* 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.
	* testsuite/util/testsuite_common_types.h
	(implicitly_default_constructible): New helper.

Tested powerpc64le-linux, committed to trunk.
commit 5725c25679751b72c4f070b6d504c0a1a8b0121c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 12 15:18:49 2018 +0100

    P0935R0 Eradicating unnecessarily explicit default constructors
    
    Explicit default constructors are problematic, so this change removes
    them from <random> and <ext/random>, as per P0935R0.
    
            * include/bits/random.h (linear_congruential_engine)
            (mersenne_twister_engine, subtract_with_carry_engine, random_device)
            (uniform_real_distribution, normal_distribution)
            (lognormal_distribution, gamma_distribution, chi_squared_distribution)
            (cauchy_distribution, fisher_f_distribution, student_t_distribution)
            (bernoulli_distribution, binomial_distribution,geometric_distribution)
            (negative_binomial_distribution, exponential_distribution)
            (weibull_distribution, extreme_value_distribution): Add non-explicit
            default constructors. Remove default argument for first parameter of
            explicit constructors.
            (piecewise_constant_distribution, piecewise_linear_distribution):
            Make default constructor non-explicit.
            * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
            non-explicit default constructors. Remove default argument for first
            parameter of explicit constructor.
            (simd_fast_mersenne_twister_engine, beta_distribution)
            (rice_distribution, nakagami_distribution, pareto_distribution)
            (k_distribution, arcsine_distribution, hoyt_distribution)
            (triangular_distribution, von_mises_distribution)
            (hypergeometric_distribution, logistic_distribution)
            (uniform_inside_sphere_distribution): Likewise.
            (uniform_on_sphere_distribution): Make default constructor
            non-explicit.
            * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
            Test for non-explicit default constructor. Fix references to standard.
            * 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.
            * testsuite/util/testsuite_common_types.h
            (implicitly_default_constructible): New helper.

Comments

Tim Song June 14, 2018, 10:43 a.m. | #1
Since param_type's constructors are defined by reference to the
constructors of the distribution, P0935's changes to the distribution's
constructors apply to their param_type as well.
Jonathan Wakely June 14, 2018, 10:46 a.m. | #2
On 14/06/18 06:43 -0400, Tim Song wrote:
>Since param_type's constructors are defined by reference to the
>constructors of the distribution, P0935's changes to the distribution's
>constructors apply to their param_type as well.

Back to the patch mines I go ...
Jonathan Wakely June 14, 2018, 1:32 p.m. | #3
On 14/06/18 11:46 +0100, Jonathan Wakely wrote:
>On 14/06/18 06:43 -0400, Tim Song wrote:
>>Since param_type's constructors are defined by reference to the
>>constructors of the distribution, P0935's changes to the distribution's
>>constructors apply to their param_type as well.
>
>Back to the patch mines I go ...


This repeats the same changes to the param types.

Tested powerpc64le-linux, committed to trunk.

(The rest of P0935 is still to be done, because it requires some new
symbols to be exported from the DSO).
commit 09f385bdb64741901461712c2e9be74db46ebdc7
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jun 14 14:15:19 2018 +0100

    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.

diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 252b14d6d11..738c62fccd1 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -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)
 	{ }
 
diff --git a/libstdc++-v3/include/bits/uniform_int_dist.h b/libstdc++-v3/include/bits/uniform_int_dist.h
index 3b6d504466d..f339f62a668 100644
--- a/libstdc++-v3/include/bits/uniform_int_dist.h
+++ b/libstdc++-v3/include/bits/uniform_int_dist.h
@@ -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)
       { }
 
diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random
index 3c714f5672c..7b2d1eaba71 100644
--- a/libstdc++-v3/include/ext/random
+++ b/libstdc++-v3/include/ext/random
@@ -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));
diff --git a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
index 42096c0fd34..2d5cb074ea3 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
index 6cf82f1b86c..b5d616e8761 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
index c1c71ce2ce7..5bcf183b3dc 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
index 8ecf7c0ce4a..bdd397f1ec8 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
index 0e837ed1046..909986c7ea7 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
index 7285bd351a3..0edd542a581 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
index f9187fc7586..124ed8d6967 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
index 3032adea816..44324eab403 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
index 84d2bb73502..50f59337c0a 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
index d16a2f06db2..a6f1244b859 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::geometric_distribution<>>();
+  test.operator()<std::geometric_distribution<>::param_type>();
 }
 
 int
diff --git a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
index 5512905cf61..3e6cd142d78 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::lognormal_distribution<>>();
+  test.operator()<std::lognormal_distribution<>::param_type>();
 }
 
 int
diff --git a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
index 32847dfe699..8f74de953ac 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
index dd3e0d21655..0c2b84ecc83 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::normal_distribution<>>();
+  test.operator()<std::normal_distribution<>::param_type>();
 }
 
 int
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
index 84507b45ae7..a90f87beca8 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
index e439adf2a3f..7db4e3f0313 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
index c357581785e..82b6a1cd1c1 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
@@ -43,6 +43,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::poisson_distribution<>>();
+  test.operator()<std::poisson_distribution<>::param_type>();
 }
 
 int
diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
index 06c7deef094..9bdba65984c 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
index 8774e660e59..0774a147f7e 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
index 6a47a4dc473..85a697f73a6 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
index 96db58f2ca6..4bb2fb72eba 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
@@ -44,6 +44,7 @@ test02()
 {
   __gnu_test::implicitly_default_constructible test;
   test.operator()<std::weibull_distribution<>>();
+  test.operator()<std::weibull_distribution<>::param_type>();
 }
 
 int
diff --git a/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
index 76b5166caf5..fc06991fa93 100644
--- a/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
index 9675a557a9a..3514796ba7e 100644
--- a/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
index 53022345aea..1e11a90a811 100644
--- a/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
index d4078d4df37..06d9432f27e 100644
--- a/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
index cc11ccb2701..f6677c78216 100644
--- a/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
index 3d7db75524d..d66d76ad1f7 100644
--- a/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
index ea473f2fca5..8c4159706bf 100644
--- a/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
index c209a8d89dc..828c298e42b 100644
--- a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
index 368d7da1910..440eefa00fb 100644
--- a/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
index 1483f87000a..014bcd5042b 100644
--- a/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
index c7c6aba5936..1726a828048 100644
--- a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
@@ -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()
diff --git a/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
index e15a12d79ae..6b2f5793605 100644
--- a/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
index 8aa81b328a2..95e1783832b 100644
--- a/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
index 1a4784d49d9..7e17f4da23f 100644
--- a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
@@ -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()
Jonathan Wakely June 14, 2018, 2:12 p.m. | #4
Another piece of P0935, this time for <regex>, <locale> and
<strstream>.

The only piece left is <sstream>.

Tested powerpc64le-linux, committed to trunk.
commit 0752b4dfd8dba7bae234f6210eea74dc337ade15
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jun 14 14:58:16 2018 +0100

    P0935R0 Eradicating unnecessarily explicit default constructors
    
    More pieces of P0935R0, making default constructors non-explicit.
    
            * include/backward/strstream (strstreambuf): Add non-explicit default
            constructor.
            * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
            Likewise.
            * include/bits/regex.h (match_results): Likewise.
            * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
            default constructor.
            * testsuite/22_locale/conversions/string/1.cc: Likewise.
            * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
            * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.

diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream
index 0429c28ce35..566ad8cd130 100644
--- a/libstdc++-v3/include/backward/strstream
+++ b/libstdc++-v3/include/backward/strstream
@@ -68,7 +68,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   public:
     // Constructor, destructor
+#if __cplusplus >= 201103L
+    strstreambuf() : strstreambuf(0) { }
+    explicit strstreambuf(streamsize __initial_capacity);
+#else
     explicit strstreambuf(streamsize __initial_capacity = 0);
+#endif
     strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
 
     strstreambuf(char* __get, streamsize __n, char* __put = 0) throw ();
diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h
index bc5669f2521..e9b684b4f98 100644
--- a/libstdc++-v3/include/bits/locale_conv.h
+++ b/libstdc++-v3/include/bits/locale_conv.h
@@ -174,14 +174,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
       typedef typename _Codecvt::state_type 			   state_type;
       typedef typename wide_string::traits_type::int_type	   int_type;
 
-      /** Default constructor.
+      /// Default constructor.
+      wstring_convert() : _M_cvt(new _Codecvt()) { }
+
+      /** Constructor.
        *
        * @param  __pcvt The facet to use for conversions.
        *
        * Takes ownership of @p __pcvt and will delete it in the destructor.
        */
       explicit
-      wstring_convert(_Codecvt* __pcvt = new _Codecvt()) : _M_cvt(__pcvt)
+      wstring_convert(_Codecvt* __pcvt) : _M_cvt(__pcvt)
       {
 	if (!_M_cvt)
 	  __throw_logic_error("wstring_convert");
@@ -325,7 +328,10 @@ _GLIBCXX_END_NAMESPACE_CXX11
     public:
       typedef typename _Codecvt::state_type state_type;
 
-      /** Default constructor.
+      /// Default constructor.
+      wbuffer_convert() : wbuffer_convert(nullptr) { }
+
+      /** Constructor.
        *
        * @param  __bytebuf The underlying byte stream buffer.
        * @param  __pcvt    The facet to use for conversions.
@@ -334,7 +340,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
        * Takes ownership of @p __pcvt and will delete it in the destructor.
        */
       explicit
-      wbuffer_convert(streambuf* __bytebuf = 0, _Codecvt* __pcvt = new _Codecvt,
+      wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt = new _Codecvt,
 		      state_type __state = state_type())
       : _M_buf(__bytebuf), _M_cvt(__pcvt), _M_state(__state)
       {
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 674be9ac50c..6b6501e98ae 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -1600,12 +1600,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
       /**
        * @brief Constructs a default %match_results container.
        * @post size() returns 0 and str() returns an empty string.
+       * @{
        */
+      match_results() : match_results(_Alloc()) { }
+
       explicit
-      match_results(const _Alloc& __a = _Alloc()) noexcept
+      match_results(const _Alloc& __a) noexcept
       : _Base_type(__a)
       { }
 
+      // @}
+
       /**
        * @brief Copy constructs a %match_results.
        */
diff --git a/libstdc++-v3/testsuite/22_locale/conversions/buffer/1.cc b/libstdc++-v3/testsuite/22_locale/conversions/buffer/1.cc
index 5d0c664679b..0f3f9ffb35a 100644
--- a/libstdc++-v3/testsuite/22_locale/conversions/buffer/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/conversions/buffer/1.cc
@@ -22,6 +22,7 @@
 #include <locale>
 #include <sstream>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 template<typename Elem>
 struct cvt : std::codecvt<Elem, char, std::mbstate_t> { };
@@ -42,6 +43,9 @@ void test01()
   VERIFY( buf.rdbuf(&sbuf) == nullptr );
   VERIFY( buf.rdbuf() == &sbuf );
   VERIFY( buf.rdbuf(nullptr) == &sbuf );
+
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<buf_conv<wchar_t>>(); // P0935R0
 }
 
 void test02()
diff --git a/libstdc++-v3/testsuite/22_locale/conversions/string/1.cc b/libstdc++-v3/testsuite/22_locale/conversions/string/1.cc
index ff260267e87..a2a8641d520 100644
--- a/libstdc++-v3/testsuite/22_locale/conversions/string/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/conversions/string/1.cc
@@ -22,6 +22,7 @@
 #include <locale>
 #include <string>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 template<typename Elem>
 struct cvt : std::codecvt<Elem, char, std::mbstate_t> { };
@@ -43,6 +44,9 @@ void test01()
   string roundtrip = c.to_bytes(output);
   VERIFY( input == roundtrip );
   VERIFY( c.converted() == roundtrip.length() );
+
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<sc>(); // P0935R0
 }
 
 void test02()
@@ -64,6 +68,9 @@ void test02()
   VERIFY( c.to_bytes(output[0]) == input.substr(0, 1) );
   VERIFY( c.to_bytes(output.c_str()) == input );
   VERIFY( c.to_bytes(output.data(), output.data()+output.size()) == input );
+
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<wsc>(); // P0935R0
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/28_regex/match_results/ctors/char/default.cc b/libstdc++-v3/testsuite/28_regex/match_results/ctors/char/default.cc
index 6708c82943c..1023ad44d3e 100644
--- a/libstdc++-v3/testsuite/28_regex/match_results/ctors/char/default.cc
+++ b/libstdc++-v3/testsuite/28_regex/match_results/ctors/char/default.cc
@@ -23,8 +23,9 @@
 
 #include <regex>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
-// Tests default constructor of the match_result class.  
+// Tests default constructor of the match_result class.
 void test01()
 {
   std::cmatch cm;
@@ -43,10 +44,18 @@ void test02()
   VERIFY( sm.begin() == sm.end() ); // PR libstdc++/83600
 }
 
+void test03()
+{
+  // P0935R0
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::cmatch>();
+  test.operator()<std::smatch>();
+}
+
 int
 main()
-{ 
+{
   test01();
   test02();
-  return 0;
+  test03();
 }
diff --git a/libstdc++-v3/testsuite/28_regex/match_results/ctors/wchar_t/default.cc b/libstdc++-v3/testsuite/28_regex/match_results/ctors/wchar_t/default.cc
index 37bf58085c4..f533f0ed402 100644
--- a/libstdc++-v3/testsuite/28_regex/match_results/ctors/wchar_t/default.cc
+++ b/libstdc++-v3/testsuite/28_regex/match_results/ctors/wchar_t/default.cc
@@ -23,8 +23,9 @@
 
 #include <regex>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
-// Tests default constructor of the match_result class.  
+// Tests default constructor of the match_result class.
 void test01()
 {
   std::wcmatch cm;
@@ -43,10 +44,18 @@ void test02()
   VERIFY( sm.begin() == sm.end() ); // PR libstdc++/83600
 }
 
+void test03()
+{
+  // P0935R0
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::wcmatch>();
+  test.operator()<std::wsmatch>();
+}
+
 int
 main()
-{ 
+{
   test01();
   test02();
-  return 0;
+  test03();
 }
Jonathan Wakely June 15, 2018, 4:13 p.m. | #5
On 12/06/18 20:10 +0100, Jonathan Wakely wrote:
>Explicit default constructors are problematic, so this change removes
>them from <random> and <ext/random>, as per P0935R0.
>
>	* include/bits/random.h (linear_congruential_engine)
>	(mersenne_twister_engine, subtract_with_carry_engine, random_device)

I forgot to remove the default argument in the no-/dev/urandom version
of std::random_device. Fixed like so.

(Incidentally, it makes me very sad that our std::random_device is
5000 bytes even when it only needs to store a pointer, because we have
a union with mt19937 in it).
commit 8c359baec670ed7d0305d376ebf8ebb209e50a8a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jun 15 17:10:06 2018 +0100

    PR libstdc++/86168 fix ambiguous default constructor
    
            PR libstdc++/86168
            * include/bits/random.h (random_device(const string&)): Remove
            default argument.

diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 738c62fccd1..e59c8b0221d 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -1614,7 +1614,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     random_device() { _M_init("mt19937"); }
 
     explicit
-    random_device(const std::string& __token = "mt19937")
+    random_device(const std::string& __token)
     { _M_init_pretr1(__token); }
 #endif

Patch

diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index b76cfbb558e..252b14d6d11 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -264,6 +264,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       static constexpr result_type modulus      = __m;
       static constexpr result_type default_seed = 1u;
 
+      /**
+       * @brief Constructs a %linear_congruential_engine random number
+       *        generator engine with seed 1.
+       */
+      linear_congruential_engine() : linear_congruential_engine(default_seed)
+      { }
+
       /**
        * @brief Constructs a %linear_congruential_engine random number
        *        generator engine with seed @p __s.  The default seed value
@@ -272,7 +279,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        * @param __s The initial seed value.
        */
       explicit
-      linear_congruential_engine(result_type __s = default_seed)
+      linear_congruential_engine(result_type __s)
       { seed(__s); }
 
       /**
@@ -504,9 +511,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       static constexpr result_type initialization_multiplier = __f;
       static constexpr result_type default_seed = 5489u;
 
-      // constructors and member function
+      // constructors and member functions
+
+      mersenne_twister_engine() : mersenne_twister_engine(default_seed) { }
+
       explicit
-      mersenne_twister_engine(result_type __sd = default_seed)
+      mersenne_twister_engine(result_type __sd)
       { seed(__sd); }
 
       /**
@@ -691,12 +701,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       static constexpr size_t      long_lag     = __r;
       static constexpr result_type default_seed = 19780503u;
 
+      subtract_with_carry_engine() : subtract_with_carry_engine(default_seed)
+      { }
+
       /**
-       * @brief Constructs an explicitly seeded % subtract_with_carry_engine
+       * @brief Constructs an explicitly seeded %subtract_with_carry_engine
        *        random number generator.
        */
       explicit
-      subtract_with_carry_engine(result_type __sd = default_seed)
+      subtract_with_carry_engine(result_type __sd)
       { seed(__sd); }
 
       /**
@@ -1590,24 +1603,19 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     // constructors, destructors and member functions
 
 #ifdef _GLIBCXX_USE_RANDOM_TR1
+    random_device() { _M_init("default"); }
 
     explicit
-    random_device(const std::string& __token = "default")
-    {
-      _M_init(__token);
-    }
+    random_device(const std::string& __token) { _M_init(__token); }
 
     ~random_device()
     { _M_fini(); }
-
 #else
+    random_device() { _M_init("mt19937"); }
 
     explicit
     random_device(const std::string& __token = "mt19937")
     { _M_init_pretr1(__token); }
-
-  public:
-
 #endif
 
     static constexpr result_type
@@ -1767,6 +1775,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      /**
+       * @brief Constructs a uniform_real_distribution object.
+       *
+       * The lower bound is set to 0.0 and the upper bound to 1.0
+       */
+      uniform_real_distribution() : uniform_real_distribution(0.0) { }
+
       /**
        * @brief Constructs a uniform_real_distribution object.
        *
@@ -1774,8 +1789,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        * @param __b [IN]  The upper bound of the distribution.
        */
       explicit
-      uniform_real_distribution(_RealType __a = _RealType(0),
-				_RealType __b = _RealType(1))
+      uniform_real_distribution(_RealType __a, _RealType __b = _RealType(1))
       : _M_param(__a, __b)
       { }
 
@@ -1991,12 +2005,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      normal_distribution() : normal_distribution(0.0) { }
+
       /**
        * Constructs a normal distribution with parameters @f$mean@f$ and
        * standard deviation.
        */
       explicit
-      normal_distribution(result_type __mean = result_type(0),
+      normal_distribution(result_type __mean,
 			  result_type __stddev = result_type(1))
       : _M_param(__mean, __stddev), _M_saved_available(false)
       { }
@@ -2205,9 +2221,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_s;
       };
 
+      lognormal_distribution() : lognormal_distribution(0.0) { }
+
       explicit
-      lognormal_distribution(_RealType __m = _RealType(0),
-			     _RealType __s = _RealType(1))
+      lognormal_distribution(_RealType __m, _RealType __s = _RealType(1))
       : _M_param(__m, __s), _M_nd()
       { }
 
@@ -2425,12 +2442,17 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      /**
+       * @brief Constructs a gamma distribution with parameters 1 and 1.
+       */
+      gamma_distribution() : gamma_distribution(1.0) { }
+
       /**
        * @brief Constructs a gamma distribution with parameters
        * @f$\alpha@f$ and @f$\beta@f$.
        */
       explicit
-      gamma_distribution(_RealType __alpha_val = _RealType(1),
+      gamma_distribution(_RealType __alpha_val,
 			 _RealType __beta_val = _RealType(1))
       : _M_param(__alpha_val, __beta_val), _M_nd()
       { }
@@ -2630,8 +2652,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_n;
       };
 
+      chi_squared_distribution() : chi_squared_distribution(1) { }
+
       explicit
-      chi_squared_distribution(_RealType __n = _RealType(1))
+      chi_squared_distribution(_RealType __n)
       : _M_param(__n), _M_gd(__n / 2)
       { }
 
@@ -2856,9 +2880,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_b;
       };
 
+      cauchy_distribution() : cauchy_distribution(0.0) { }
+
       explicit
-      cauchy_distribution(_RealType __a = _RealType(0),
-			  _RealType __b = _RealType(1))
+      cauchy_distribution(_RealType __a, _RealType __b = 1.0)
       : _M_param(__a, __b)
       { }
 
@@ -3062,8 +3087,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_n;
       };
 
+      fisher_f_distribution() : fisher_f_distribution(1.0) { }
+
       explicit
-      fisher_f_distribution(_RealType __m = _RealType(1),
+      fisher_f_distribution(_RealType __m,
 			    _RealType __n = _RealType(1))
       : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2)
       { }
@@ -3285,8 +3312,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_n;
       };
 
+      student_t_distribution() : student_t_distribution(1.0) { }
+
       explicit
-      student_t_distribution(_RealType __n = _RealType(1))
+      student_t_distribution(_RealType __n)
       : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2)
       { }
 
@@ -3508,6 +3537,11 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
   public:
+    /**
+     * @brief Constructs a Bernoulli distribution with likelihood 0.5.
+     */
+    bernoulli_distribution() : bernoulli_distribution(0.5) { }
+
     /**
      * @brief Constructs a Bernoulli distribution with likelihood @p p.
      *
@@ -3515,7 +3549,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
      *                   Must be in the interval @f$[0, 1]@f$.
      */
     explicit
-    bernoulli_distribution(double __p = 0.5)
+    bernoulli_distribution(double __p)
     : _M_param(__p)
     { }
 
@@ -3739,10 +3773,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	bool   _M_easy;
       };
 
-      // constructors and member function
+      // constructors and member functions
+
+      binomial_distribution() : binomial_distribution(1) { }
+
       explicit
-      binomial_distribution(_IntType __t = _IntType(1),
-			    double __p = 0.5)
+      binomial_distribution(_IntType __t, double __p = 0.5)
       : _M_param(__t, __p), _M_nd()
       { }
 
@@ -3964,9 +4000,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	double _M_log_1_p;
       };
 
-      // constructors and member function
+      // constructors and member functions
+
+      geometric_distribution() : geometric_distribution(0.5) { }
+
       explicit
-      geometric_distribution(double __p = 0.5)
+      geometric_distribution(double __p)
       : _M_param(__p)
       { }
 
@@ -4166,8 +4205,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	double _M_p;
       };
 
+      negative_binomial_distribution() : negative_binomial_distribution(1) { }
+
       explicit
-      negative_binomial_distribution(_IntType __k = 1, double __p = 0.5)
+      negative_binomial_distribution(_IntType __k, double __p = 0.5)
       : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p)
       { }
 
@@ -4399,9 +4440,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
       };
 
-      // constructors and member function
+      // constructors and member functions
+
+      poisson_distribution() : poisson_distribution(1.0) { }
+
       explicit
-      poisson_distribution(double __mean = 1.0)
+      poisson_distribution(double __mean)
       : _M_param(__mean), _M_nd()
       { }
 
@@ -4610,12 +4654,18 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      /**
+       * @brief Constructs an exponential distribution with inverse scale
+       *        parameter 1.0
+       */
+      exponential_distribution() : exponential_distribution(1.0) { }
+
       /**
        * @brief Constructs an exponential distribution with inverse scale
        *        parameter @f$\lambda@f$.
        */
       explicit
-      exponential_distribution(const result_type& __lambda = result_type(1))
+      exponential_distribution(_RealType __lambda)
       : _M_param(__lambda)
       { }
 
@@ -4820,9 +4870,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_b;
       };
 
+      weibull_distribution() : weibull_distribution(1.0) { }
+
       explicit
-      weibull_distribution(_RealType __a = _RealType(1),
-			   _RealType __b = _RealType(1))
+      weibull_distribution(_RealType __a, _RealType __b = _RealType(1))
       : _M_param(__a, __b)
       { }
 
@@ -5028,9 +5079,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_b;
       };
 
+      extreme_value_distribution() : extreme_value_distribution(0.0) { }
+
       explicit
-      extreme_value_distribution(_RealType __a = _RealType(0),
-				 _RealType __b = _RealType(1))
+      extreme_value_distribution(_RealType __a, _RealType __b = _RealType(1))
       : _M_param(__a, __b)
       { }
 
@@ -5496,7 +5548,6 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	std::vector<double> _M_cp;
       };
 
-      explicit
       piecewise_constant_distribution()
       : _M_param()
       { }
@@ -5769,7 +5820,6 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	std::vector<double> _M_m;
       };
 
-      explicit
       piecewise_linear_distribution()
       : _M_param()
       { }
diff --git a/libstdc++-v3/include/bits/uniform_int_dist.h b/libstdc++-v3/include/bits/uniform_int_dist.h
index 64d4445aa33..3b6d504466d 100644
--- a/libstdc++-v3/include/bits/uniform_int_dist.h
+++ b/libstdc++-v3/include/bits/uniform_int_dist.h
@@ -98,11 +98,16 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      /**
+       * @brief Constructs a uniform distribution object.
+       */
+      uniform_int_distribution() : uniform_int_distribution(0) { }
+
       /**
        * @brief Constructs a uniform distribution object.
        */
       explicit
-      uniform_int_distribution(_IntType __a = 0,
+      uniform_int_distribution(_IntType __a,
 			   _IntType __b = std::numeric_limits<_IntType>::max())
       : _M_param(__a, __b)
       { }
diff --git a/libstdc++-v3/include/ext/random b/libstdc++-v3/include/ext/random
index 7e931865af3..3c714f5672c 100644
--- a/libstdc++-v3/include/ext/random
+++ b/libstdc++-v3/include/ext/random
@@ -96,9 +96,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 							/ sizeof(result_type));
       static constexpr result_type default_seed = 5489u;
 
-      // constructors and member function
+      // constructors and member functions
+
+      simd_fast_mersenne_twister_engine()
+      : simd_fast_mersenne_twister_engine(default_seed)
+      { }
+
       explicit
-      simd_fast_mersenne_twister_engine(result_type __sd = default_seed)
+      simd_fast_mersenne_twister_engine(result_type __sd)
       { seed(__sd); }
 
       template<typename _Sseq, typename = _If_seed_seq<_Sseq>>
@@ -454,12 +459,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       };
 
     public:
+      beta_distribution() : beta_distribution(1.0) { }
+
       /**
        * @brief Constructs a beta distribution with parameters
        * @f$\alpha@f$ and @f$\beta@f$.
        */
       explicit
-      beta_distribution(_RealType __alpha_val = _RealType(1),
+      beta_distribution(_RealType __alpha_val,
 			_RealType __beta_val = _RealType(1))
       : _M_param(__alpha_val, __beta_val)
       { }
@@ -998,9 +1005,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      rice_distribution() : rice_distribution(0) { }
+
       explicit
-      rice_distribution(result_type __nu_val = result_type(0),
+      rice_distribution(result_type __nu_val,
 			result_type __sigma_val = result_type(1))
       : _M_param(__nu_val, __sigma_val),
 	_M_ndx(__nu_val, __sigma_val),
@@ -1014,6 +1025,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_M_ndy(result_type(0), __p.sigma())
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -1244,9 +1257,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      nakagami_distribution() : nakagami_distribution(1) { }
+
       explicit
-      nakagami_distribution(result_type __mu_val = result_type(1),
+      nakagami_distribution(result_type __mu_val,
 			    result_type __omega_val = result_type(1))
       : _M_param(__mu_val, __omega_val),
 	_M_gd(__mu_val, __omega_val / __mu_val)
@@ -1258,6 +1275,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_M_gd(__p.mu(), __p.omega() / __p.mu())
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -1481,9 +1500,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      pareto_distribution() : pareto_distribution(1) { }
+
       explicit
-      pareto_distribution(result_type __alpha_val = result_type(1),
+      pareto_distribution(result_type __alpha_val,
 			  result_type __mu_val = result_type(1))
       : _M_param(__alpha_val, __mu_val),
 	_M_ud()
@@ -1495,6 +1518,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_M_ud()
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -1731,9 +1756,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      k_distribution() : k_distribution(1) { }
+
       explicit
-      k_distribution(result_type __lambda_val = result_type(1),
+      k_distribution(result_type __lambda_val,
 		     result_type __mu_val = result_type(1),
 		     result_type __nu_val = result_type(1))
       : _M_param(__lambda_val, __mu_val, __nu_val),
@@ -1748,6 +1777,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_M_gd2(__p.nu(), __p.mu() / __p.nu())
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -1965,10 +1996,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * :{
        */
+
+      arcsine_distribution() : arcsine_distribution(0) { }
+
       explicit
-      arcsine_distribution(result_type __a = result_type(0),
-			   result_type __b = result_type(1))
+      arcsine_distribution(result_type __a, result_type __b = result_type(1))
       : _M_param(__a, __b),
 	_M_ud(-1.5707963267948966192313216916397514L,
 	      +1.5707963267948966192313216916397514L)
@@ -1981,6 +2015,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	      +1.5707963267948966192313216916397514L)
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -2207,10 +2243,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      hoyt_distribution() : hoyt_distribution(0.5) { }
+
       explicit
-      hoyt_distribution(result_type __q = result_type(0.5L),
-			result_type __omega = result_type(1))
+      hoyt_distribution(result_type __q, result_type __omega = result_type(1))
       : _M_param(__q, __omega),
 	_M_ad(result_type(0.5L) * (result_type(1) + __q * __q),
 	      result_type(0.5L) * (result_type(1) + __q * __q)
@@ -2459,12 +2498,14 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_f_bc_ac;
       };
 
+      triangular_distribution() : triangular_distribution(0.0) { }
+
       /**
        * @brief Constructs a triangle distribution with parameters
        * @f$ a @f$, @f$ b @f$ and @f$ c @f$.
        */
       explicit
-      triangular_distribution(result_type __a = result_type(0),
+      triangular_distribution(result_type __a,
 			      result_type __b = result_type(0.5),
 			      result_type __c = result_type(1))
       : _M_param(__a, __b, __c)
@@ -2668,6 +2709,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     public:
       /** The type of the range of the distribution. */
       typedef _RealType result_type;
+
       /** Parameter type. */
       struct param_type
       {
@@ -2711,14 +2753,16 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	_RealType _M_r;
       };
 
+      von_mises_distribution() : von_mises_distribution(0.0) { }
+
       /**
        * @brief Constructs a von Mises distribution with parameters
        * @f$\mu@f$ and @f$\kappa@f$.
        */
       explicit
-      von_mises_distribution(result_type __mu = result_type(0),
+      von_mises_distribution(result_type __mu,
 			     result_type __kappa = result_type(1))
-	: _M_param(__mu, __kappa)
+      : _M_param(__mu, __kappa)
       { }
 
       explicit
@@ -2956,9 +3000,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	result_type _M_n;
       };
 
-      // constructors and member function
+      // constructors and member functions
+
+      hypergeometric_distribution() : hypergeometric_distribution(10) { }
+
       explicit
-      hypergeometric_distribution(result_type __N = 10, result_type __K = 5,
+      hypergeometric_distribution(result_type __N, result_type __K = 5,
 				  result_type __n = 1)
       : _M_param{__N, __K, __n}
       { }
@@ -3209,10 +3256,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+      logistic_distribution() : logistic_distribution(0.0) { }
+
       explicit
-      logistic_distribution(result_type __a = result_type(0),
-			    result_type __b = result_type(1))
+      logistic_distribution(result_type __a, result_type __b = result_type(1))
       : _M_param(__a, __b)
       { }
 
@@ -3221,6 +3270,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : _M_param(__p)
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
@@ -3401,7 +3452,6 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       /**
        * @brief Constructs a uniform on sphere distribution.
        */
-      explicit
       uniform_on_sphere_distribution()
       : _M_param(), _M_nd()
       { }
@@ -3609,9 +3659,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /**
        * @brief Constructors.
+       * @{
        */
+
+      uniform_inside_sphere_distribution()
+      : uniform_inside_sphere_distribution(1.0)
+      { }
+
       explicit
-      uniform_inside_sphere_distribution(_RealType __radius = _RealType(1))
+      uniform_inside_sphere_distribution(_RealType __radius)
       : _M_param(__radius), _M_uosd()
       { }
 
@@ -3620,6 +3676,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       : _M_param(__p), _M_uosd()
       { }
 
+      // @}
+
       /**
        * @brief Resets the distribution state.
        */
diff --git a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
index 46c5af0f2a4..42096c0fd34 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.2.1 Class template bernoulli_distribution [rand.dist.bern.bernoulli]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.3.1 Class bernoulli_distribution [rand.dist.bern.bernoulli]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -35,8 +37,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<bool>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::bernoulli_distribution>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
index 74a7a786064..6cf82f1b86c 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.2.2 Class template binomial_distribution [rand.dist.bern.bin]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.3.2 Class template binomial_distribution [rand.dist.bern.bin]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,15 @@  test01()
   VERIFY( u.max() == u.t() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::binomial_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
index 04bc15c5182..c1c71ce2ce7 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.4 Class template cauchy_distribution [rand.dist.norm.cauchy]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.4 Class template cauchy_distribution [rand.dist.norm.cauchy]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::cauchy_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
index df985c3e653..8ecf7c0ce4a 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.3 Class template chi_squared_distribution [rand.dist.norm.chisq]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.3 Class template chi_squared_distribution [rand.dist.norm.chisq]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::chi_squared_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
index 6a82f46a686..0e837ed1046 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.5.1 Class template discrete_distribution [rand.dist.samp.discrete]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.6.1 Class template discrete_distribution [rand.dist.samp.discrete]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -35,8 +37,15 @@  test01()
   VERIFY( probablility[0] == 1.0 );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::discrete_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
index 00b1f003c61..7285bd351a3 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.3.2 Class template exponential_distribution [rand.dist.pois.exp]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.4.2 Class template exponential_distribution [rand.dist.pois.exp]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::exponential_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
index db3dc19dbe4..f9187fc7586 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.3.5 Class template extreme_value_distribution [rand.dist.pois.extreme]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.4.5 Class template extreme_value_distribution [rand.dist.pois.extreme]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::extreme_value_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
index 16c2077b7da..3032adea816 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.5 Class template fisher_f_distribution [rand.dist.norm.f]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.5 Class template fisher_f_distribution [rand.dist.norm.f]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::fisher_f_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
index 8274d45d669..84d2bb73502 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.3.3 Class template gamma_distribution [rand.dist.pois.gamma]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.4.3 Class template gamma_distribution [rand.dist.pois.gamma]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,15 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::gamma_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
index 35221f313fe..d16a2f06db2 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.2.3 Class template geometric_distribution [rand.dist.bern.geo]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.3.3 Class template geometric_distribution [rand.dist.bern.geo]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::geometric_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
index b6d57737cfa..5512905cf61 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.2 Class template lognormal_distribution [rand.dist.norm.lognormal]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.2 Class template lognormal_distribution [rand.dist.norm.lognormal]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::lognormal_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
index f6e2f1d7798..32847dfe699 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.2.4 Class template negative_binomial_distribution [rand.dist.bern.negbin]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.3.4 Class template negative_binomial_distribution [rand.dist.bern.negbin]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::negative_binomial_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
index 941927ba0b4..dd3e0d21655 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.1 Class template normal_distribution [rand.dist.norm.normal]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.1 Class template normal_distribution [rand.dist.norm.normal]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::normal_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
index 40eb9da422d..84507b45ae7 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.5.2 Class template piecewise_constant_distribution [rand.dist.samp.pconst]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.6.2 Class template piecewise_constant_distribution [rand.dist.samp.pconst]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -39,8 +41,16 @@  test01()
   VERIFY( density[0] == 1.0 );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::piecewise_constant_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
index 11fbc2c537e..e439adf2a3f 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.5.3 Class template piecewise_linear_distribution [rand.dist.samp.plinear]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.6.3 Class template piecewise_linear_distribution [rand.dist.samp.plinear]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -40,8 +42,16 @@  test01()
   VERIFY( density[1] == 1.0 );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::piecewise_linear_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
index 71d0ca0f048..c357581785e 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.3.1 Class template poisson_distribution [rand.dist.pois.poisson]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.4.1 Class template poisson_distribution [rand.dist.pois.poisson]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::poisson_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
index 3524a45b9ff..06c7deef094 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.4.6 Class template student_t_distribution [rand.dist.norm.t]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.5.6 Class template student_t_distribution [rand.dist.norm.t]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::student_t_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
index ccfbe26f3c0..8774e660e59 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc
@@ -20,12 +20,14 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.1.1 Class template uniform_int_distribution [rand.dist.uni.int]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.2.1 Class template uniform_int_distribution [rand.dist.uni.int]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <limits>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<int>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::uniform_int_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
index 662f8981099..6a47a4dc473 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.1.1 Class template uniform_real_distribution [rand.dist.uni.real]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.2.2 Class template uniform_real_distribution [rand.dist.uni.real]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -36,8 +38,16 @@  test01()
   VERIFY( u.max() == 1.0 );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::uniform_real_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
index 369805eaed9..96db58f2ca6 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/cons/default.cc
@@ -20,11 +20,13 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 26.4.8.3.4 Class template weibull_distribution [rand.dist.pois.weibull]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
+// C++11
+// 26.5.8.4.4 Class template weibull_distribution [rand.dist.pois.weibull]
+// 26.5.1.6 random number distribution requirements [rand.req.dist]
 
 #include <random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,8 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
-int main()
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<std::weibull_distribution<>>();
+}
+
+int
+main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
index 3b6ed697c72..76b5166caf5 100644
--- a/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/arcsine_distribution/cons/default.cc
@@ -22,6 +22,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -33,9 +34,16 @@  test01()
   VERIFY( u.max() == 1.0 );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::arcsine_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
index 375d6c538b3..9675a557a9a 100644
--- a/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/beta_distribution/cons/default.cc
@@ -23,6 +23,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -34,8 +35,15 @@  test01()
   VERIFY( u.max() == 1.0 );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::beta_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
index c4c9a9c0961..53022345aea 100644
--- a/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/hoyt_distribution/cons/default.cc
@@ -22,6 +22,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -34,9 +35,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::hoyt_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
index 659db01dc76..d4078d4df37 100644
--- a/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/hypergeometric_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,9 +38,16 @@  test01()
   VERIFY( u.max() == 1 );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::hypergeometric_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
index 6e06683c26e..cc11ccb2701 100644
--- a/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/k_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -38,9 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::k_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
index 6d902785402..3d7db75524d 100644
--- a/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/logistic_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -38,9 +39,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::logistic_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
index 9bc6e2c41f8..ea473f2fca5 100644
--- a/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/nakagami_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,9 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::nakagami_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
index f691e13022b..c209a8d89dc 100644
--- a/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/normal_mv_distribution/cons/default.cc
@@ -23,6 +23,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -40,8 +41,15 @@  test01()
   VERIFY( u.max()[1] == std::numeric_limits<result_type::value_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::normal_mv_distribution<2>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
index d320a6be070..368d7da1910 100644
--- a/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/pareto_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,9 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::pareto_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
index 5a3b92787ce..1483f87000a 100644
--- a/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/rice_distribution/cons/default.cc
@@ -25,6 +25,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -37,9 +38,16 @@  test01()
   VERIFY( u.max() == std::numeric_limits<result_type>::max() );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::rice_distribution<>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
index 8f33e3acdef..c7c6aba5936 100644
--- a/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/triangular_distribution/cons/default.cc
@@ -23,6 +23,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -35,8 +36,15 @@  test01()
   VERIFY( u.max() == 1.0 );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::triangular_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
index 7a7c04d6455..e15a12d79ae 100644
--- a/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc
@@ -23,6 +23,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -35,9 +36,16 @@  test01()
   __gnu_cxx::uniform_inside_sphere_distribution<5, float> u5;
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::uniform_inside_sphere_distribution<2>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
index 446893dd122..8aa81b328a2 100644
--- a/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc
@@ -24,6 +24,7 @@ 
 // 26.5.1.6 Random number distribution requirements [rand.req.dist]
 
 #include <ext/random>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -34,9 +35,16 @@  test01()
   __gnu_cxx::uniform_on_sphere_distribution<5, float> u5;
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::uniform_on_sphere_distribution<2>>();
+}
+
 int
 main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
index 9ae700257c9..1a4784d49d9 100644
--- a/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
+++ b/libstdc++-v3/testsuite/ext/random/von_mises_distribution/cons/default.cc
@@ -23,6 +23,7 @@ 
 
 #include <ext/random>
 #include <testsuite_hooks.h>
+#include <testsuite_common_types.h>
 
 void
 test01()
@@ -34,8 +35,15 @@  test01()
   VERIFY( u.max() == __gnu_cxx::__math_constants<double>::__pi );
 }
 
+void
+test02()
+{
+  __gnu_test::implicitly_default_constructible test;
+  test.operator()<__gnu_cxx::von_mises_distribution<>>();
+}
+
 int main()
 {
   test01();
-  return 0;
+  test02();
 }
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index 1069a1a997b..2e977b57cf1 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -687,6 +687,26 @@  namespace __gnu_test
   };
 
 #if __cplusplus >= 201103L
+  // Generator to test non-explicit default constructor.
+  struct implicitly_default_constructible
+  {
+    template<typename _Tp>
+      void
+      operator()()
+      {
+	struct _Concept
+	{
+	  struct Aggregate { _Tp v; };
+
+	  void __constraint()
+	  { Aggregate __v __attribute__((unused)) = { }; }
+	};
+
+	void (_Concept::*__x)() __attribute__((unused))
+	  = &_Concept::__constraint;
+      }
+  };
+
   // Generator to test default constructor.
   struct constexpr_default_constructible
   {