summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-26 17:22:43 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-26 17:22:43 +0000
commit077e75e9e93253a12b81deeed45e1a1609acc8fa (patch)
treeb50b8ff006d3491976f7481a3226bfe91c2a541e
parent75a15fa3c9c32ce6006cfae1aa31f6246e657e4b (diff)
downloadgcc-077e75e9e93253a12b81deeed45e1a1609acc8fa.tar.gz
2012-08-26 Marc Glisse <marc.glisse@inria.fr>
Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/54376 * include/bits/random.h (lognormal_distribution<>::operator==, gamma_distribution<>::operator==, chi_squared_distribution<>::operator==, fisher_f_distribution<>::operator==, student_t_distribution<>::operator==, binomial_distribution<>::operator==, negative_binomial_distribution<>::operator==, poisson_distribution<>::operator==): Change inline friend definition to non-template. * testsuite/26_numerics/random/binomial_distribution/requirements/ explicit_instantiation/1.cc: New. * testsuite/26_numerics/random/cauchy_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/chi_squared_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/discrete_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/exponential_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/extreme_value_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/fisher_f_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/gamma_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/geometric_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/lognormal_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/negative_binomial_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/normal_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/piecewise_constant_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/piecewise_linear_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/poisson_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/student_t_distribution/requirements/ explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/uniform_int_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/uniform_real_distribution/ requirements/explicit_instantiation/1.cc: Likewise. * testsuite/26_numerics/random/weibull_distribution/requirements/ explicit_instantiation/1.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190694 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog52
-rw-r--r--libstdc++-v3/include/bits/random.h82
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/normal_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/requirements/explicit_instantiation/1.cc27
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/requirements/explicit_instantiation/1.cc26
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/requirements/explicit_instantiation/1.cc26
21 files changed, 589 insertions, 45 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4ff0a5cb720..057d4357638 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,55 @@
+2012-08-26 Marc Glisse <marc.glisse@inria.fr>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/54376
+ * include/bits/random.h (lognormal_distribution<>::operator==,
+ gamma_distribution<>::operator==,
+ chi_squared_distribution<>::operator==,
+ fisher_f_distribution<>::operator==,
+ student_t_distribution<>::operator==,
+ binomial_distribution<>::operator==,
+ negative_binomial_distribution<>::operator==,
+ poisson_distribution<>::operator==): Change inline friend definition
+ to non-template.
+ * testsuite/26_numerics/random/binomial_distribution/requirements/
+ explicit_instantiation/1.cc: New.
+ * testsuite/26_numerics/random/cauchy_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/chi_squared_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/discrete_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/exponential_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/extreme_value_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/fisher_f_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/gamma_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/geometric_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/lognormal_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/negative_binomial_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/normal_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/piecewise_constant_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/piecewise_linear_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/poisson_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/student_t_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/uniform_int_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/uniform_real_distribution/
+ requirements/explicit_instantiation/1.cc: Likewise.
+ * testsuite/26_numerics/random/weibull_distribution/requirements/
+ explicit_instantiation/1.cc: Likewise.
+
2012-08-26 Jonathan Wakely <jwakely.gcc@gmail.com>
* testsuite/30_threads/async/54297.cc: Add dg-require-nanosleep.
diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 4361296bca0..b43b5f49c4c 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -2332,12 +2332,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would
* be generated are equal.
*/
- template<typename _RealType1>
- friend bool
- operator==(const std::lognormal_distribution<_RealType1>& __d1,
- const std::lognormal_distribution<_RealType1>& __d2)
- { return (__d1.param() == __d2.param()
- && __d1._M_nd == __d2._M_nd); }
+ friend bool
+ operator==(const lognormal_distribution& __d1,
+ const lognormal_distribution& __d2)
+ { return (__d1.param() == __d2.param()
+ && __d1._M_nd == __d2._M_nd); }
/**
* @brief Inserts a %lognormal_distribution random number distribution
@@ -2525,12 +2524,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* parameters and the sequences that would be generated
* are equal.
*/
- template<typename _RealType1>
- friend bool
- operator==(const std::gamma_distribution<_RealType1>& __d1,
- const std::gamma_distribution<_RealType1>& __d2)
- { return (__d1.param() == __d2.param()
- && __d1._M_nd == __d2._M_nd); }
+ friend bool
+ operator==(const gamma_distribution& __d1,
+ const gamma_distribution& __d2)
+ { return (__d1.param() == __d2.param()
+ && __d1._M_nd == __d2._M_nd); }
/**
* @brief Inserts a %gamma_distribution random number distribution
@@ -2571,7 +2569,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @brief Return true if two gamma distributions are different.
*/
template<typename _RealType>
- inline bool
+ inline bool
operator!=(const std::gamma_distribution<_RealType>& __d1,
const std::gamma_distribution<_RealType>& __d2)
{ return !(__d1 == __d2); }
@@ -2690,11 +2688,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would be
* generated are equal.
*/
- template<typename _RealType1>
- friend bool
- operator==(const std::chi_squared_distribution<_RealType1>& __d1,
- const std::chi_squared_distribution<_RealType1>& __d2)
- { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+ friend bool
+ operator==(const chi_squared_distribution& __d1,
+ const chi_squared_distribution& __d2)
+ { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
/**
* @brief Inserts a %chi_squared_distribution random number distribution
@@ -3043,13 +3040,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would
* be generated are equal.
*/
- template<typename _RealType1>
- friend bool
- operator==(const std::fisher_f_distribution<_RealType1>& __d1,
- const std::fisher_f_distribution<_RealType1>& __d2)
- { return (__d1.param() == __d2.param()
- && __d1._M_gd_x == __d2._M_gd_x
- && __d1._M_gd_y == __d2._M_gd_y); }
+ friend bool
+ operator==(const fisher_f_distribution& __d1,
+ const fisher_f_distribution& __d2)
+ { return (__d1.param() == __d2.param()
+ && __d1._M_gd_x == __d2._M_gd_x
+ && __d1._M_gd_y == __d2._M_gd_y); }
/**
* @brief Inserts a %fisher_f_distribution random number distribution
@@ -3217,12 +3213,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would
* be generated are equal.
*/
- template<typename _RealType1>
- friend bool
- operator==(const std::student_t_distribution<_RealType1>& __d1,
- const std::student_t_distribution<_RealType1>& __d2)
- { return (__d1.param() == __d2.param()
- && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
+ friend bool
+ operator==(const student_t_distribution& __d1,
+ const student_t_distribution& __d2)
+ { return (__d1.param() == __d2.param()
+ && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); }
/**
* @brief Inserts a %student_t_distribution random number distribution
@@ -3593,10 +3588,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would
* be generated are equal.
*/
- template<typename _IntType1>
friend bool
- operator==(const std::binomial_distribution<_IntType1>& __d1,
- const std::binomial_distribution<_IntType1>& __d2)
+ operator==(const binomial_distribution& __d1,
+ const binomial_distribution& __d2)
#ifdef _GLIBCXX_USE_C99_MATH_TR1
{ return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
#else
@@ -3950,11 +3944,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* the same parameters and the sequences that would be
* generated are equal.
*/
- template<typename _IntType1>
- friend bool
- operator==(const std::negative_binomial_distribution<_IntType1>& __d1,
- const std::negative_binomial_distribution<_IntType1>& __d2)
- { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
+ friend bool
+ operator==(const negative_binomial_distribution& __d1,
+ const negative_binomial_distribution& __d2)
+ { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; }
/**
* @brief Inserts a %negative_binomial_distribution random
@@ -4134,14 +4127,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* parameters and the sequences that would be generated
* are equal.
*/
- template<typename _IntType1>
- friend bool
- operator==(const std::poisson_distribution<_IntType1>& __d1,
- const std::poisson_distribution<_IntType1>& __d2)
+ friend bool
+ operator==(const poisson_distribution& __d1,
+ const poisson_distribution& __d2)
#ifdef _GLIBCXX_USE_C99_MATH_TR1
- { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+ { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
#else
- { return __d1.param() == __d2.param(); }
+ { return __d1.param() == __d2.param(); }
#endif
/**
diff --git a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..9bdad10a9a5
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::binomial_distribution<int>;
+template class std::binomial_distribution<long>;
+template class std::binomial_distribution<unsigned int>;
+template class std::binomial_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..ad33135e789
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::cauchy_distribution<float>;
+template class std::cauchy_distribution<double>;
+template class std::cauchy_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..626d538b264
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::chi_squared_distribution<float>;
+template class std::chi_squared_distribution<double>;
+template class std::chi_squared_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..2041218cb5d
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::discrete_distribution<int>;
+template class std::discrete_distribution<long>;
+template class std::discrete_distribution<unsigned int>;
+template class std::discrete_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..5addabcc3fa
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::exponential_distribution<float>;
+template class std::exponential_distribution<double>;
+template class std::exponential_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..02125e920fe
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::extreme_value_distribution<float>;
+template class std::extreme_value_distribution<double>;
+template class std::extreme_value_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..f6c62e9076b
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::fisher_f_distribution<float>;
+template class std::fisher_f_distribution<double>;
+template class std::fisher_f_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..c6ad617f679
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::gamma_distribution<float>;
+template class std::gamma_distribution<double>;
+template class std::gamma_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..7a8e31d9870
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::geometric_distribution<int>;
+template class std::geometric_distribution<long>;
+template class std::geometric_distribution<unsigned int>;
+template class std::geometric_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..20ba45838bf
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::lognormal_distribution<float>;
+template class std::lognormal_distribution<double>;
+template class std::lognormal_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..36f48735008
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::negative_binomial_distribution<int>;
+template class std::negative_binomial_distribution<long>;
+template class std::negative_binomial_distribution<unsigned int>;
+template class std::negative_binomial_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..9fe18ba6143
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::normal_distribution<float>;
+template class std::normal_distribution<double>;
+template class std::normal_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..e2a04d771bd
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::piecewise_constant_distribution<float>;
+template class std::piecewise_constant_distribution<double>;
+template class std::piecewise_constant_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..d3b52a3ebf7
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::piecewise_linear_distribution<float>;
+template class std::piecewise_linear_distribution<double>;
+template class std::piecewise_linear_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..2f762a27a9b
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::poisson_distribution<int>;
+template class std::poisson_distribution<long>;
+template class std::poisson_distribution<unsigned int>;
+template class std::poisson_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..a11280b8359
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::student_t_distribution<float>;
+template class std::student_t_distribution<double>;
+template class std::student_t_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..b9851186365
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::uniform_int_distribution<int>;
+template class std::uniform_int_distribution<long>;
+template class std::uniform_int_distribution<unsigned int>;
+template class std::uniform_int_distribution<unsigned long>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..011fa34a49f
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::uniform_real_distribution<float>;
+template class std::uniform_real_distribution<double>;
+template class std::uniform_real_distribution<long double>;
diff --git a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/requirements/explicit_instantiation/1.cc b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/requirements/explicit_instantiation/1.cc
new file mode 100644
index 00000000000..8e268ef80b8
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/requirements/explicit_instantiation/1.cc
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <random>
+
+template class std::weibull_distribution<float>;
+template class std::weibull_distribution<double>;
+template class std::weibull_distribution<long double>;