This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] libstdc++/39629 (final bits)


Hi,

the below resolves the PR to zero -m32/-m64 fails. In a couple of cases
a formula was incorrect + we had equality comparison operators for the
distributions, not required by the draft Standard and really not making
sense because involving equality comparison of floats. At some point we
may want a robust, proper way to test the serialization of the
distributions, closely following the draft standard (26.4.1.5/5).

Tested x86_64-linux, -m32/-m64, committed to mainline.

Paolo.

////////////////////
2009-04-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/39629 (final bits)
	* include/bits/random.h (subtract_with_carry_engine<>::_S_modulus):
	Remove, consistently use __detail::_Shift<_UIntType, __w>::__value.
	* include/bits/random.tcc (shuffle_order_engine<>::operator()()):
	Fix formula for __j.
	* include/bits/random.tcc (operator==(const normal_distribution<>&,
	const normal_distribution<>&): Remove.
	* include/bits/random.h (operator==(const uniform_int_distribution<>&,
	const uniform_int_distribution<>&), operator==(const
	uniform_real_distribution<>&, const uniform_real_distribution<>&),
	operator==(const normal_distribution<>&, const normal_distribution<>&), 
	operator==(const lognormal_distribution<>&,
	const lognormal_distribution<>&), operator==(const
	chi_squared_distribution<>&, const chi_squared_distribution<>&),
	operator==(const cauchy_distribution<>&, const cauchy_distribution<>&),
	operator==(const fisher_distribution<>&, const fisher_distribution<>&),
	operator==(const student_t_distribution<>&,
	const student_t_distribution<>&), operator==(const
	bernoulli_distribution<>&, const bernoulli_distribution<>&),
	operator==(const binomial_distribution<>&, const
	binomial_distribution<>&), operator==(const geometric_distribution<>&,
	const geometric_distribution<>&), operator==(const
	negative_binomial_distribution<>&, const 
	negative_binomial_distribution<>&), operator==(const
	poisson_distribution<>&, const poisson_distribution<>&),
	operator==(const exponential_distribution<>&,
	const exponential_distribution<>&), operator==(const
	gamma_distribution<>&, const gamma_distribution<>&), operator==(const
	weibull_distribution<>&, const weibull_distribution<>&),
	operator==(const extreme_value_distribution<>&,
	const extreme_value_distribution<>&), operator==(const
	discrete_distribution<>&, const discrete_distribution<>&),
	operator==(const piecewise_constant_distribution<>&,
	const piecewise_constant_distribution<>&), operator==(const
	piecewise_linear_distribution<>&, const
	piecewise_linear_distribution<>&)): Remove.
	* testsuite/26_numerics/random/uniform_real_distribution/operators/
	serialize.cc: Remove.
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/chi_squared_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/normal_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/uniform_int_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/poisson_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/bernoulli_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/discrete_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/weibull_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/negative_binomial_distribution/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/cauchy_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/gamma_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/fisher_f_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/exponential_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/lognormal_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/binomial_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/extreme_value_distribution/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/student_t_distribution/operators/
	serialize.cc: Likewise.
	* testsuite/26_numerics/random/geometric_distribution/operators/
	serialize.cc: Likewise.

	* include/bits/random.h (linear_congruential_engine<>::seed(_Gen&,
	true_type), linear_congruential_engine<>::seed(_Gen&, false_type),
	mersenne_twister_engine<>::seed(_Gen&,
	true_type), mersenne_twister_engine<>::seed(_Gen&, false_type),
	subtract_with_carry_engine<>::seed(_Gen&,
	true_type), subtract_with_carry_engine<>::seed(_Gen&, false_type)):
	Remove, unused.
	* include/bits/random.tcc (linear_congruential_engine<>::
	seed(_Gen&, false_type): Likewise.
Index: include/bits/random.tcc
===================================================================
--- include/bits/random.tcc	(revision 145810)
+++ include/bits/random.tcc	(working copy)
@@ -95,23 +95,23 @@
   } // namespace __detail
 
   /**
-   * Seeds the LCR with integral value @p __x0, adjusted so that the
+   * Seeds the LCR with integral value @p __s, adjusted so that the
    * ring identity is never a member of the convergence set.
    */
   template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
     void
     linear_congruential_engine<_UIntType, __a, __c, __m>::
-    seed(_UIntType __x0)
+    seed(result_type __s)
     {
       if ((__detail::__mod<_UIntType, 1U, 0U, __m>(__c) == 0U)
-	  && (__detail::__mod<_UIntType, 1U, 0U, __m>(__x0) == 0U))
+	  && (__detail::__mod<_UIntType, 1U, 0U, __m>(__s) == 0U))
 	_M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(1U);
       else
-	_M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(__x0);
+	_M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(__s);
     }
 
   /**
-   * Seeds the LCR engine with a value generated by @p __g.
+   * Seeds the LCR engine with a value generated by @p __q.
    */
   template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
     void
@@ -122,40 +122,18 @@
 	                              : std::__lg(__m);
       const _UIntType __k = (__k0 + 31) / 32;
       _UIntType __arr[__k + 3];
-      __q.generate(__arr + 0, __arr + 3);
+      __q.generate(__arr + 0, __arr + __k + 3);
       _UIntType __factor = 1U;
       _UIntType __sum = 0U;
-      for (size_t __i = 0; __i < __k; ++__i)
+      for (size_t __j = 0; __j < __k; ++__j)
         {
-          __sum += __arr[__i + 3] * __factor;
+          __sum += __arr[__j + 3] * __factor;
           __factor *= __detail::_Shift<_UIntType, 32>::__value;
         }
-
-      if ((__detail::__mod<_UIntType, 1U, 0U, __m>(__c) == 0U)
-	  && (__detail::__mod<_UIntType, 1U, 0U, __m>(__sum) == 0U))
-        _M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(1U);
-      else
-        _M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(__sum);
+      seed(__sum);
     }
 
   /**
-   * Seeds the LCR engine with a value generated by @p __g.
-   */
-  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    template<typename _Gen>
-      void
-      linear_congruential_engine<_UIntType, __a, __c, __m>::
-      seed(_Gen& __g, false_type)
-      {
-	_UIntType __x0 = __g();
-	if ((__detail::__mod<_UIntType, 1U, 0U, __m>(__c) == 0U)
-	    && (__detail::__mod<_UIntType, 1U, 0U, __m>(__x0) == 0U))
-	  _M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(1U);
-	else
-	  _M_x = __detail::__mod<_UIntType, 1U, 0U, __m>(__x0);
-      }
-
-  /**
    * Gets the next generated value in sequence.
    */
   template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
@@ -404,7 +382,8 @@
 			 (__lcg()) * __factor;
 	      __factor *= __detail::_Shift<_UIntType, 32>::__value;
 	    }
-	  _M_x[__i] = __detail::__mod<_UIntType, 1, 0, _S_modulus>(__sum);
+	  _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
+	    __detail::_Shift<_UIntType, __w>::__value>(__sum);
 	}
       _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
       _M_p = 0;
@@ -416,7 +395,7 @@
     seed(seed_seq& __q)
     {
       const size_t __n = (word_size + 31) / 32;
-      unsigned int __arr[long_lag + __n];
+      _UIntType __arr[long_lag + __n];
       __q.generate(__arr + 0, __arr + long_lag + __n);
 
       for (size_t __i = 0; __i < long_lag; ++__i)
@@ -429,7 +408,8 @@
 		         (__arr[__i * __n + __j]) * __factor;
 	      __factor *= __detail::_Shift<_UIntType, 32>::__value;
             }
-          _M_x[__i] = __detail::__mod<_UIntType, 1, 0, _S_modulus>(__sum);
+          _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
+	    __detail::_Shift<_UIntType, __w>::__value>(__sum);
         }
       _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
       _M_p = 0;
@@ -457,7 +437,8 @@
 	}
       else
 	{
-	  __xi = _S_modulus - _M_x[_M_p] - _M_carry + _M_x[__ps];
+	  __xi = (__detail::_Shift<_UIntType, __w>::__value
+		  - _M_x[_M_p] - _M_carry + _M_x[__ps]);
 	  _M_carry = 1;
 	}
       _M_x[_M_p] = __xi;
@@ -624,8 +605,8 @@
     shuffle_order_engine<_RandomNumberEngine, __k>::
     operator()()
     {
-      size_t __j = (__k * (_M_y - _M_b.min()))
-		 / (_M_b.max() - _M_b.min() + 1);
+      size_t __j = __k * ((_M_y - _M_b.min())
+			  / (_M_b.max() - _M_b.min() + 1.0L));
       _M_y = _M_v[__j];
       _M_v[__j] = _M_b();
 
@@ -1442,30 +1423,6 @@
     }
 
 
-  template<typename _RealType>
-    bool
-    operator==(const normal_distribution<_RealType>& __d1,
-	       const normal_distribution<_RealType>& __d2)
-    {
-      if (__d1._M_param == __d2._M_param)
-	{
-	  if (__d1._M_saved_available == __d2._M_saved_available)
-	    {
-	      if (__d1._M_saved_available
-	       && __d1._M_saved == __d2._M_saved)
-		return true;
-	      else if(!__d1._M_saved_available)
-		return true;
-	      else
-		return false;
-	    }
-	  else
-	    return false;
-	}
-      else
-	return false;
-    }
-
   /**
    * Polar method due to Marsaglia.
    *
Index: include/bits/random.h
===================================================================
--- include/bits/random.h	(revision 145810)
+++ include/bits/random.h	(working copy)
@@ -75,8 +75,8 @@
 
     // XXX need constexpr
     template<typename _UIntType, size_t __w,
-	     bool = __w <static_cast<size_t>
-			 (std::numeric_limits<_UIntType>::digits)>
+	     bool = __w < static_cast<size_t>
+			  (std::numeric_limits<_UIntType>::digits)>
       struct _ShiftMin1
       {
 	static const _UIntType __value =
@@ -211,7 +211,7 @@
       static const result_type increment    = __c;
       /** The modulus. */
       static const result_type modulus      = __m;
-      static const result_type default_seed = 1UL;
+      static const result_type default_seed = 1u;
 
       /**
        * @brief Constructs a %linear_congruential_engine random number
@@ -263,7 +263,7 @@
        */
       result_type
       min() const
-      { return (__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0) ? 1 : 0; }
+      { return __c == 0u ? 1u : 0u; }
 
       /**
        * @brief Gets the largest possible value in the output range.
@@ -272,7 +272,7 @@
        */
       result_type
       max() const
-      { return __m - 1; }
+      { return __m - 1u; }
 
       /**
        * @brief Discard a sequence of random numbers.
@@ -345,15 +345,6 @@
 		   __c1, __m1>&);
 
     private:
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, true_type)
-	{ return seed(static_cast<unsigned long>(__g)); }
-
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, false_type);
-
       _UIntType _M_x;
     };
 
@@ -434,7 +425,7 @@
       static const result_type tempering_c               = __c;
       static const size_t      tempering_l               = __l;
       static const size_t      initialization_multiplier = __f;
-      static const result_type default_seed = 5489UL;
+      static const result_type default_seed = 5489u;
 
       // constructors and member function
       explicit
@@ -559,15 +550,6 @@
 		   __l1, __f1>&);
 
     private:
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, true_type)
-	{ return seed(static_cast<unsigned long>(__g)); }
-
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, false_type);
-
       _UIntType _M_x[state_size];
       size_t    _M_p;
     };
@@ -607,7 +589,7 @@
       static const size_t      word_size    = __w;
       static const size_t      short_lag    = __s;
       static const size_t      long_lag     = __r;
-      static const result_type default_seed = 19780503;
+      static const result_type default_seed = 19780503u;
 
       /**
        * @brief Constructs an explicitly seeded % subtract_with_carry_engine
@@ -667,7 +649,7 @@
        */
       result_type
       max() const
-      { return _S_modulus - 1U; }
+      { return __detail::_ShiftMin1<_UIntType, __w>::__value; }
 
       /**
        * @brief Discard a sequence of random numbers.
@@ -741,18 +723,6 @@
 		   __s1, __r1>&);
 
     private:
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, true_type)
-	{ return seed(static_cast<unsigned long>(__g)); }
-
-      template<typename _Gen>
-	void
-	seed(_Gen& __g, false_type);
-
-      static const size_t _S_modulus
-	= __detail::_Shift<_UIntType, __w>::__value;
-
       _UIntType  _M_x[long_lag];
       _UIntType  _M_carry;
       size_t     _M_p;
@@ -1569,10 +1539,6 @@
 	b() const
 	{ return _M_b; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_a == __p2._M_a) && (__p1._M_b == __p2._M_b); }
-
       private:
 	_IntType _M_a;
 	_IntType _M_b;
@@ -1687,16 +1653,6 @@
     };
 
   /**
-   * @brief Return true if two uniform integer distributions have
-   *        the same parameters.
-   */
-  template<typename _IntType>
-    inline bool
-    operator==(const std::uniform_int_distribution<_IntType>& __d1,
-	       const std::uniform_int_distribution<_IntType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %uniform_int_distribution random number
    *        distribution @p __x into the output stream @p os.
    *
@@ -1760,10 +1716,6 @@
 	b() const
 	{ return _M_b; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_a == __p2._M_a) && (__p1._M_b == __p2._M_b); }
-
       private:
 	_RealType _M_a;
 	_RealType _M_b;
@@ -1856,16 +1808,6 @@
     };
 
   /**
-   * @brief Return true if two uniform real distributions have
-   *        the same parameters.
-   */
-  template<typename _IntType>
-    inline bool
-    operator==(const std::uniform_real_distribution<_IntType>& __d1,
-	       const std::uniform_real_distribution<_IntType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %uniform_real_distribution random number
    *        distribution @p __x into the output stream @p __os.
    *
@@ -1936,11 +1878,6 @@
 	stddev() const
 	{ return _M_stddev; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_mean == __p2._M_mean)
-	      && (__p1._M_stddev == __p2._M_stddev); }
-
       private:
 	_RealType _M_mean;
 	_RealType _M_stddev;
@@ -2023,15 +1960,6 @@
 		   const param_type& __p);
 
       /**
-       * @brief Return true if two normal distributions have
-       *        the same parameters.
-       */
-      template<typename _RealType1>
-	friend bool
-        operator==(const std::normal_distribution<_RealType1>& __d1,
-		   const std::normal_distribution<_RealType1>& __d2);
-
-      /**
        * @brief Inserts a %normal_distribution random number distribution
        * @p __x into the output stream @p __os.
        *
@@ -2100,10 +2028,6 @@
 	s() const
 	{ return _M_s; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_m == __p2._M_m) && (__p1._M_s == __p2._M_s); }
-
       private:
 	_RealType _M_m;
 	_RealType _M_s;
@@ -2182,16 +2106,6 @@
     };
 
   /**
-   * @brief Return true if two lognormal distributions have
-   *        the same parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::lognormal_distribution<_RealType>& __d1,
-	       const std::lognormal_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %lognormal_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -2248,10 +2162,6 @@
 	n() const
 	{ return _M_n; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_n == __p2._M_n; }
-
       private:
 	_RealType _M_n;
       };
@@ -2324,16 +2234,6 @@
     };
 
   /**
-   * @brief Return true if two Chi-squared distributions have
-   *        the same parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::chi_squared_distribution<_RealType>& __d1,
-	       const std::chi_squared_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %chi_squared_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -2395,10 +2295,6 @@
 	b() const
 	{ return _M_b; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_a == __p2._M_a) && (__p1._M_b == __p2._M_b); }
-
       private:
 	_RealType _M_a;
 	_RealType _M_b;
@@ -2477,16 +2373,6 @@
     };
 
   /**
-   * @brief Return true if two Cauchy distributions have
-   *        the same parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::cauchy_distribution<_RealType>& __d1,
-	       const std::cauchy_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %cauchy_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -2550,10 +2436,6 @@
 	n() const
 	{ return _M_n; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_m == __p2._M_m) && (__p1._M_n == __p2._M_n); }
-
       private:
 	_RealType _M_m;
 	_RealType _M_n;
@@ -2632,16 +2514,6 @@
     };
 
   /**
-   * @brief Return true if two Fisher f distributions have
-   *        the same parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::fisher_f_distribution<_RealType>& __d1,
-	       const std::fisher_f_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %fisher_f_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -2699,10 +2571,6 @@
 	n() const
 	{ return _M_n; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_n == __p2._M_n; }
-
       private:
 	_RealType _M_n;
       };
@@ -2780,16 +2648,6 @@
     };
 
   /**
-   * @brief Return true if two Student t distributions have
-   *        the same parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::student_t_distribution<_RealType>& __d1,
-	       const std::student_t_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %student_t_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -2854,10 +2712,6 @@
       p() const
       { return _M_p; }
 
-      friend bool
-      operator==(const param_type& __p1, const param_type& __p2)
-      { return __p1._M_p == __p2._M_p; }
-
     private:
       double _M_p;
     };
@@ -2956,15 +2810,6 @@
   };
 
   /**
-   * @brief Return true if two Bernoulli distributions have
-   *        the same parameters.
-   */
-  inline bool
-  operator==(const std::bernoulli_distribution& __d1,
-	     const std::bernoulli_distribution& __d2)
-  { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %bernoulli_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -3039,10 +2884,6 @@
 	p() const
 	{ return _M_p; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_t == __p2._M_t) && (__p1._M_p == __p2._M_p); }
-
       private:
 	void
 	_M_initialize();
@@ -3120,17 +2961,6 @@
       max() const
       { return _M_param.t(); }
 
-      /**
-       * @brief Return true if two binomial distributions have
-       *        the same parameters.
-       */
-      template<typename _IntType1>
-	friend bool
-        operator==(const std::binomial_distribution<_IntType1>& __d1,
-		   const std::binomial_distribution<_IntType1>& __d2)
-	{ return ((__d1.param() == __d2.param())
-		  && (__d1._M_nd == __d2._M_nd)); }
-
       template<typename _UniformRandomNumberGenerator>
 	result_type
 	operator()(_UniformRandomNumberGenerator& __urng)
@@ -3219,10 +3049,6 @@
 	p() const
 	{ return _M_p; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_p == __p2._M_p; }
-
       private:
 	void
 	_M_initialize()
@@ -3303,16 +3129,6 @@
     };
 
   /**
-   * @brief Return true if two geometric distributions have
-   *        the same parameters.
-   */
-  template<typename _IntType>
-    inline bool
-    operator==(const geometric_distribution<_IntType>& __d1,
-	       const geometric_distribution<_IntType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %geometric_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -3377,10 +3193,6 @@
 	p() const
 	{ return _M_p; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_k == __p2._M_k) && (__p1._M_p == __p2._M_p); }
-
       private:
 	_IntType _M_k;
 	double _M_p;
@@ -3461,16 +3273,6 @@
     };
 
   /**
-   * @brief Return true if two negative binomial distributions have
-   *        the same parameters.
-   */
-  template<typename _IntType>
-    inline bool
-    operator==(const std::negative_binomial_distribution<_IntType>& __d1,
-	       const std::negative_binomial_distribution<_IntType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %negative_binomial_distribution random
    *        number distribution @p __x into the output stream @p __os.
    *
@@ -3542,10 +3344,6 @@
 	mean() const
 	{ return _M_mean; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_mean == __p2._M_mean; }
-
       private:
 	// Hosts either log(mean) or the threshold of the simple method.
 	void
@@ -3624,17 +3422,6 @@
 		   const param_type& __p);
 
       /**
-       * @brief Return true if two Poisson distributions have the same
-       *        parameters.
-       */
-      template<typename _IntType1>
-	friend bool
-        operator==(const std::poisson_distribution<_IntType1>& __d1,
-		   const std::poisson_distribution<_IntType1>& __d2)
-	{ return ((__d1.param() == __d2.param())
-		  && (__d1._M_nd == __d2._M_nd)); }
-
-      /**
        * @brief Inserts a %poisson_distribution random number distribution
        * @p __x into the output stream @p __os.
        *
@@ -3708,10 +3495,6 @@
 	lambda() const
 	{ return _M_lambda; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_lambda == __p2._M_lambda; }
-
       private:
 	_RealType _M_lambda;
       };
@@ -3799,16 +3582,6 @@
     };
 
   /**
-   * @brief Return true if two exponential distributions have the same
-   *        parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::exponential_distribution<_RealType>& __d1,
-	       const std::exponential_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %exponential_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -3875,11 +3648,6 @@
 	beta() const
 	{ return _M_beta; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return ((__p1._M_alpha == __p2._M_alpha)
-		  && (__p1._M_beta == __p2._M_beta)); }
-
       private:
 	void
 	_M_initialize();
@@ -3973,16 +3741,6 @@
     };
 
   /**
-   * @brief Return true if two gamma distributions have the same
-   *        parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::gamma_distribution<_RealType>& __d1,
-	       const std::gamma_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %gamma_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -4044,10 +3802,6 @@
 	b() const
 	{ return _M_b; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_a == __p2._M_a) && (__p1._M_b == __p2._M_b); }
-
       private:
 	_RealType _M_a;
 	_RealType _M_b;
@@ -4135,16 +3889,6 @@
     };
 
   /**
-   * @brief Return true if two Weibull distributions have the same
-   *        parameters.
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::weibull_distribution<_RealType>& __d1,
-	       const std::weibull_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %weibull_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -4207,10 +3951,6 @@
 	b() const
 	{ return _M_b; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return (__p1._M_a == __p2._M_a) && (__p1._M_b == __p2._M_b); }
-
       private:
 	_RealType _M_a;
 	_RealType _M_b;
@@ -4292,15 +4032,6 @@
     };
 
   /**
-   *
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::extreme_value_distribution<_RealType>& __d1,
-	       const std::extreme_value_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
-  /**
    * @brief Inserts a %extreme_value_distribution random number distribution
    * @p __x into the output stream @p __os.
    *
@@ -4373,10 +4104,6 @@
 	probabilities() const
 	{ return _M_prob; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return __p1._M_prob == __p2._M_prob; }
-
       private:
 	void
 	_M_initialize();
@@ -4498,15 +4225,6 @@
       param_type _M_param;
     };
 
-  /**
-   *
-   */
-  template<typename _IntType>
-    inline bool
-    operator==(const std::discrete_distribution<_IntType>& __d1,
-	       const std::discrete_distribution<_IntType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
 
   /**
    * @brief A piecewise_constant_distribution random number distribution.
@@ -4548,11 +4266,6 @@
 	densities() const
 	{ return _M_den; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return ((__p1._M_int == __p2._M_int)
-		  && (__p1._M_den == __p2._M_den)); }
-
       private:
 	void
 	_M_initialize();
@@ -4688,15 +4401,6 @@
       param_type _M_param;
     };
 
-  /**
-   *
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::piecewise_constant_distribution<_RealType>& __d1,
-	       const std::piecewise_constant_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
-
 
   /**
    * @brief A piecewise_linear_distribution random number distribution.
@@ -4738,11 +4442,6 @@
 	densities() const
 	{ return _M_den; }
 
-	friend bool
-	operator==(const param_type& __p1, const param_type& __p2)
-	{ return ((__p1._M_int == __p2._M_int)
-		  && (__p1._M_den == __p2._M_den)); }
-
       private:
 	void
 	_M_initialize();
@@ -4880,14 +4579,6 @@
       param_type _M_param;
     };
 
-  /**
-   *
-   */
-  template<typename _RealType>
-    inline bool
-    operator==(const std::piecewise_linear_distribution<_RealType>& __d1,
-	       const std::piecewise_linear_distribution<_RealType>& __d2)
-    { return __d1.param() == __d2.param(); }
 
   /* @} */ // group std_random_distributions_poisson
 
Index: testsuite/26_numerics/random/uniform_real_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/uniform_real_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/uniform_real_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.1.2 Class template uniform_real_distribution [rand.dist.uni.real]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::uniform_real_distribution<double> u(-5.0, 5.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/piecewise_constant_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_constant_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/piecewise_constant_distribution/operators/serialize.cc	(working copy)
@@ -1,55 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-12-05  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.5.2 Class template piecewise_constant_distribution [rand.dist.samp.pconst]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::vector<double> x = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
-  std::vector<double> wt = {0.5, 1.0, 2.5, 1.5, 0.5};
-  std::piecewise_constant_distribution<double>
-     u(x.begin(), x.end(), wt.begin()), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/chi_squared_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/chi_squared_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/chi_squared_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.4.3 Class template chi_squared_distribution [rand.dist.norm.chisq]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::chi_squared_distribution<double> u(1.5), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/normal_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/normal_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/normal_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.4.1 Class template normal_distribution [rand.dist.norm.normal]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::normal_distribution<double> u(5.0, 2.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/uniform_int_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/uniform_int_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/uniform_int_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.1.1 Class template uniform_int_distribution [rand.dist_uni]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::uniform_int_distribution<int> u(1, 20), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/poisson_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/poisson_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/poisson_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.3.1 Class template poisson_distribution [rand.dist.pois.poisson]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::poisson_distribution<int> u(5.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/bernoulli_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/bernoulli_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/bernoulli_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.2.1 Class template bernoulli_distribution [rand.dist.bern.bernoulli]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::bernoulli_distribution u(0.75), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/discrete_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/discrete_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/discrete_distribution/operators/serialize.cc	(working copy)
@@ -1,53 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-12-05  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.5.1 Class template discrete_distribution [rand.dist.samp.discrete]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::vector<double> wt = {0.5, 1.0, 2.5, 1.5, 0.5};
-  std::discrete_distribution<int> u(wt.begin(), wt.end()), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/weibull_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/weibull_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/weibull_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.3.4 Class template weibull_distribution [rand.dist.pois.weibull]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::weibull_distribution<double> u(2.0, 3.5), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/negative_binomial_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/negative_binomial_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/negative_binomial_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.2.4 Class template negative_binomial_distribution [rand.dist.bern.negbin]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::negative_binomial_distribution<int> u(3, 0.75), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/cauchy_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/cauchy_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/cauchy_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.4.1 class template discard_block_engine [rand.adapt.disc]
-// 26.4.2.3 concept RandomNumberEngineAdaptor [rand.concept.adapt]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::cauchy_distribution<double> u(5.0, 2.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/gamma_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/gamma_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/gamma_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.3.3 Class template gamma_distribution [rand.dist.pois.gamma]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::gamma_distribution<double> u(1.5, 3.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/fisher_f_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/fisher_f_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/fisher_f_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.4.5 Class template fisher_f_distribution [rand.dist.norm.f]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::fisher_f_distribution<double> u(2.0, 3.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/exponential_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/exponential_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/exponential_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.3.2 Class template exponential_distribution [rand.dist.pois.exp]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::exponential_distribution<double> u(0.5), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/lognormal_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/lognormal_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/lognormal_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.4.2 Class template lognormal_distribution [rand.dist.norm.lognormal]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::lognormal_distribution<double> u(5.0, 2.0), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/binomial_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/binomial_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/binomial_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.2.2 Class template binomial_distribution [rand.dist.bern.bin]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::binomial_distribution<int> u(3, 0.75), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/extreme_value_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/extreme_value_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/extreme_value_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.3.5 Class template extreme_value_distribution [rand.dist.pois.extreme]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::extreme_value_distribution<double> u, v(5.0, 2.0);
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize.cc	(working copy)
@@ -1,58 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-12-05  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008, 2009 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.5.3 Class template piecewise_linear_distribution [rand.dist.samp.plinear]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-
-  typedef double value_type;
-  typedef std::piecewise_linear_distribution<double> distribution_type;
-  std::vector<double> x = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
-  std::vector<double> wt = {0.0, 1.0, 2.5, 1.5, 0.5, 0.0};
-  distribution_type u(x.begin(), x.end(), wt.begin());
-  distribution_type v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/student_t_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/student_t_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/student_t_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.4.6 Class template student_t_distribution [rand.dist.norm.t]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::student_t_distribution<double> u(1.5), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/26_numerics/random/geometric_distribution/operators/serialize.cc
===================================================================
--- testsuite/26_numerics/random/geometric_distribution/operators/serialize.cc	(revision 145810)
+++ testsuite/26_numerics/random/geometric_distribution/operators/serialize.cc	(working copy)
@@ -1,52 +0,0 @@
-// { dg-options "-std=c++0x" }
-//
-// 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
-//
-// Copyright (C) 2008 Free 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 2, 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 26.4.8.2.3 Class template geometric_distribution [rand.dist.bern.geom]
-// 26.4.2.4 Concept RandomNumberDistribution [rand.concept.dist]
-
-#include <random>
-#include <sstream>
-#include <testsuite_hooks.h>
-
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-
-  std::stringstream str;
-  std::geometric_distribution<int> u(0.75), v;
-  std::minstd_rand0 rng;
-
-  u(rng); // advance
-  str << u;
-
-  VERIFY( !(u == v) );
-
-  str >> v;
-  VERIFY( u == v );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]