]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
random.h (operator==(const uniform_int_distribution<>&, const uniform_int_distributio...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 16 Mar 2010 16:14:00 +0000 (16:14 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 16 Mar 2010 16:14:00 +0000 (16:14 +0000)
2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/random.h (operator==(const uniform_int_distribution<>&,
const uniform_int_distribution<>&), operator==(const
uniform_real_distribution<>&, const uniform_real_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<>&)): Add, likewise for operator!=.
(operator!=(const independent_bits_engine<>&, const
independent_bits_engine<>&), operator!=(const
subtract_with_carry_engine<>&, const subtract_with_carry_engine<>&),
operator!=(const discard_block_engine<>&, const
discard_block_engine<>&), operator!=(const mersenne_twister_engine<>&,
const mersenne_twister_engine<>&), operator!=(const
linear_congruential_engine<>&, const linear_congruential_engine<>&),
operator!=(const shuffle_order_engine<>&, const
shuffle_order_engine<>&): Add.
* include/bits/random.tcc (operator==(const normal_distribution<>&,
const normal_distribution<>&)): Add.
* testsuite/26_numerics/random/uniform_real_distribution/operators/
inequal.cc: New.
* testsuite/26_numerics/random/uniform_real_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/piecewise_constant_distribution/
operators/inequal.cc: Likewise.
* testsuite/26_numerics/random/piecewise_constant_distribution/
operators/equal.cc: Likewise.
* testsuite/26_numerics/random/chi_squared_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/chi_squared_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/normal_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/normal_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/poisson_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/poisson_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/bernoulli_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/bernoulli_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/discrete_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/discrete_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/weibull_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/weibull_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/subtract_with_carry_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/discard_block_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/cauchy_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/cauchy_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/
operators/inequal.cc: Likewise.
* testsuite/26_numerics/random/negative_binomial_distribution/
operators/equal.cc: Likewise.
* testsuite/26_numerics/random/gamma_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/gamma_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/mersenne_twister_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/fisher_f_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/fisher_f_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/exponential_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/exponential_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/binomial_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/binomial_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/lognormal_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/lognormal_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/extreme_value_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/extreme_value_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/piecewise_linear_distribution/
operators/inequal.cc: Likewise.
* testsuite/26_numerics/random/piecewise_linear_distribution/
operators/equal.cc: Likewise.
* testsuite/26_numerics/random/student_t_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/student_t_distribution/operators/
equal.cc: Likewise.
* testsuite/26_numerics/random/linear_congruential_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/shuffle_order_engine/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/geometric_distribution/operators/
inequal.cc: Likewise.
* testsuite/26_numerics/random/geometric_distribution/operators/
equal.cc: Likewise.

From-SVN: r157489

49 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/random.tcc
libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/inequal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/inequal.cc [new file with mode: 0644]

index 24543b02edb62bff5ea2ef831e35e9c29e684e2f..9c37f37ae30425bf5332ca77e2593e245a53ba3e 100644 (file)
@@ -1,3 +1,137 @@
+2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/random.h (operator==(const uniform_int_distribution<>&,
+       const uniform_int_distribution<>&), operator==(const
+       uniform_real_distribution<>&, const uniform_real_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<>&)): Add, likewise for operator!=.
+       (operator!=(const independent_bits_engine<>&, const
+       independent_bits_engine<>&), operator!=(const
+       subtract_with_carry_engine<>&, const subtract_with_carry_engine<>&),
+       operator!=(const discard_block_engine<>&, const
+       discard_block_engine<>&), operator!=(const mersenne_twister_engine<>&,
+       const mersenne_twister_engine<>&), operator!=(const
+       linear_congruential_engine<>&, const linear_congruential_engine<>&),
+       operator!=(const shuffle_order_engine<>&, const
+       shuffle_order_engine<>&): Add.
+       * include/bits/random.tcc (operator==(const normal_distribution<>&,
+       const normal_distribution<>&)): Add.
+       * testsuite/26_numerics/random/uniform_real_distribution/operators/
+       inequal.cc: New.
+       * testsuite/26_numerics/random/uniform_real_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/piecewise_constant_distribution/
+       operators/inequal.cc: Likewise.
+       * testsuite/26_numerics/random/piecewise_constant_distribution/
+       operators/equal.cc: Likewise.
+       * testsuite/26_numerics/random/chi_squared_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/chi_squared_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/normal_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/normal_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/uniform_int_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/uniform_int_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/poisson_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/poisson_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/bernoulli_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/bernoulli_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/discrete_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/discrete_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/weibull_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/weibull_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/subtract_with_carry_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/discard_block_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/cauchy_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/cauchy_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/negative_binomial_distribution/
+       operators/inequal.cc: Likewise.
+       * testsuite/26_numerics/random/negative_binomial_distribution/
+       operators/equal.cc: Likewise.
+       * testsuite/26_numerics/random/gamma_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/gamma_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/mersenne_twister_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/fisher_f_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/fisher_f_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/exponential_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/exponential_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/binomial_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/binomial_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/lognormal_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/lognormal_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/extreme_value_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/extreme_value_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/piecewise_linear_distribution/
+       operators/inequal.cc: Likewise.
+       * testsuite/26_numerics/random/piecewise_linear_distribution/
+       operators/equal.cc: Likewise.
+       * testsuite/26_numerics/random/student_t_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/student_t_distribution/operators/
+       equal.cc: Likewise.
+       * testsuite/26_numerics/random/linear_congruential_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/shuffle_order_engine/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/geometric_distribution/operators/
+       inequal.cc: Likewise.
+       * testsuite/26_numerics/random/geometric_distribution/operators/
+       equal.cc: Likewise.
+
 2010-03-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/forward_list.tcc (_Fwd_list_node_base::
index 159724c89ee31cb6117f7d4863bd3af499e641ed..3f1a61535af49611649ac125e0ab149e97655baf 100644 (file)
@@ -268,7 +268,8 @@ namespace std
        * @param __rhs Another linear congruential random number generator
        *              object.
        *
-       * @returns true if the two objects are equal, false otherwise.
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
        */
       friend bool
       operator==(const linear_congruential_engine& __lhs,
@@ -314,6 +315,25 @@ namespace std
       _UIntType _M_x;
     };
 
+  /**
+   * @brief Compares two linear congruential random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A linear congruential random number generator object.
+   * @param __rhs Another linear congruential random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+    inline bool
+    operator!=(const std::linear_congruential_engine<_UIntType, __a,
+              __c, __m>& __lhs,
+              const std::linear_congruential_engine<_UIntType, __a,
+              __c, __m>& __rhs)
+    { return !(__lhs == __rhs); }
+
 
   /**
    * A generalized feedback shift register discrete random number generator.
@@ -461,7 +481,8 @@ namespace std
        * @param __rhs Another % mersenne_twister_engine random number
        *              generator object.
        *
-       * @returns true if the two objects are equal, false otherwise.
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
        */
       friend bool
       operator==(const mersenne_twister_engine& __lhs,
@@ -525,6 +546,31 @@ namespace std
       size_t    _M_p;
     };
 
+  /**
+   * @brief Compares two % mersenne_twister_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A % mersenne_twister_engine random number generator
+   *              object.
+   * @param __rhs Another % mersenne_twister_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w,
+          size_t __n, size_t __m, size_t __r,
+          _UIntType __a, size_t __u, _UIntType __d, size_t __s,
+          _UIntType __b, size_t __t,
+          _UIntType __c, size_t __l, _UIntType __f>
+    inline bool
+    operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+              __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs,
+              const std::mersenne_twister_engine<_UIntType, __w, __n, __m,
+              __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
   /**
    * @brief The Marsaglia-Zaman generator.
    *
@@ -655,8 +701,9 @@ namespace std
        * @param __rhs Another % subtract_with_carry_engine random number
        *              generator object.
        *
-       * @returns true if the two objects are equal, false otherwise.
-       */
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+      */
       friend bool
       operator==(const subtract_with_carry_engine& __lhs,
                 const subtract_with_carry_engine& __rhs)
@@ -706,6 +753,27 @@ namespace std
       size_t     _M_p;
     };
 
+  /**
+   * @brief Compares two % subtract_with_carry_engine random number
+   *        generator objects of the same type for inequality.
+   *
+   * @param __lhs A % subtract_with_carry_engine random number generator
+   *              object.
+   * @param __rhs Another % subtract_with_carry_engine random number
+   *              generator object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _UIntType, size_t __w, size_t __s, size_t __r>
+    inline bool
+    operator!=(const std::subtract_with_carry_engine<_UIntType, __w,
+              __s, __r>& __lhs,
+              const std::subtract_with_carry_engine<_UIntType, __w,
+              __s, __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
   /**
    * Produces random numbers from some base engine by discarding blocks of
    * data.
@@ -865,12 +933,13 @@ namespace std
        * @param __rhs Another %discard_block_engine random number generator
        *              object.
        *
-       * @returns true if the two objects are equal, false otherwise.
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
        */
       friend bool
       operator==(const discard_block_engine& __lhs,
                 const discard_block_engine& __rhs)
-      { return (__lhs._M_b == __rhs._M_b) && (__lhs._M_n == __rhs._M_n); }
+      { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; }
 
       /**
        * @brief Inserts the current state of a %discard_block_engine random
@@ -913,6 +982,26 @@ namespace std
       size_t _M_n;
     };
 
+  /**
+   * @brief Compares two %discard_block_engine random number generator
+   *        objects of the same type for inequality.
+   *
+   * @param __lhs A %discard_block_engine random number generator object.
+   * @param __rhs Another %discard_block_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __p, size_t __r>
+    inline bool
+    operator!=(const std::discard_block_engine<_RandomNumberEngine, __p,
+              __r>& __lhs,
+              const std::discard_block_engine<_RandomNumberEngine, __p,
+              __r>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
   /**
    * Produces random numbers by combining random numbers from some base
    * engine to produce random numbers with a specifies number of bits @p __w.
@@ -1060,7 +1149,8 @@ namespace std
        * @param __rhs Another %independent_bits_engine random number generator
        *              object.
        *
-       * @returns true if the two objects are equal, false otherwise.
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
        */
       friend bool
       operator==(const independent_bits_engine& __lhs,
@@ -1093,6 +1183,26 @@ namespace std
       _RandomNumberEngine _M_b;
     };
 
+  /**
+   * @brief Compares two %independent_bits_engine random number generator
+   * objects of the same type for inequality.
+   *
+   * @param __lhs A %independent_bits_engine random number generator
+   *              object.
+   * @param __rhs Another %independent_bits_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __w, typename _UIntType>
+    inline bool
+    operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w,
+              _UIntType>& __lhs,
+              const std::independent_bits_engine<_RandomNumberEngine, __w,
+              _UIntType>& __rhs)
+    { return !(__lhs == __rhs); }
+
   /**
    * @brief Inserts the current state of a %independent_bits_engine random
    *        number generator engine @p __x into the output stream @p __os.
@@ -1114,6 +1224,7 @@ namespace std
       return __os;
     }
 
+
   /**
    * @brief Produces random numbers by combining random numbers from some
    * base engine to produce random numbers with a specifies number of bits
@@ -1273,8 +1384,9 @@ namespace std
        * @param __rhs Another %shuffle_order_engine random number generator
        *              object.
        *
-       * @returns true if the two objects are equal, false otherwise.
-       */
+       * @returns true if the infinite sequences of generated values
+       *          would be equal, false otherwise.
+      */
       friend bool
       operator==(const shuffle_order_engine& __lhs,
                 const shuffle_order_engine& __rhs)
@@ -1328,6 +1440,26 @@ namespace std
       result_type _M_y;
     };
 
+  /**
+   * Compares two %shuffle_order_engine random number generator objects
+   * of the same type for inequality.
+   *
+   * @param __lhs A %shuffle_order_engine random number generator object.
+   * @param __rhs Another %shuffle_order_engine random number generator
+   *              object.
+   *
+   * @returns true if the infinite sequences of generated values
+   *          would be different, false otherwise.
+   */
+  template<typename _RandomNumberEngine, size_t __k>
+    inline bool
+    operator!=(const std::shuffle_order_engine<_RandomNumberEngine,
+              __k>& __lhs,
+              const std::shuffle_order_engine<_RandomNumberEngine,
+              __k>& __rhs)
+    { return !(__lhs == __rhs); }
+
+
   /**
    * The classic Minimum Standard rand0 of Lewis, Goodman, and Miller.
    */
@@ -1522,6 +1654,10 @@ namespace std
        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;
@@ -1609,6 +1745,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+   * @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 Return true if two uniform integer distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::uniform_int_distribution<_IntType>& __d1,
+              const std::uniform_int_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %uniform_int_distribution random number
    *        distribution @p __x into the output stream @p os.
@@ -1676,6 +1832,10 @@ namespace std
        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;
@@ -1763,6 +1923,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+   * @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 Return true if two uniform real distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::uniform_real_distribution<_IntType>& __d1,
+              const std::uniform_real_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %uniform_real_distribution random number
    *        distribution @p __x into the output stream @p __os.
@@ -1839,6 +2019,11 @@ namespace std
        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;
@@ -1920,6 +2105,16 @@ namespace std
        operator()(_UniformRandomNumberGenerator& __urng,
                   const param_type& __p);
 
+      /**
+       * @brief Return true if two normal distributions have
+       *        the same parameters and the sequences that would
+       *        be generated are equal.
+       */
+      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.
@@ -1956,6 +2151,15 @@ namespace std
       bool        _M_saved_available;
     };
 
+  /**
+   * @brief Return true if two normal distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::normal_distribution<_RealType>& __d1,
+              const std::normal_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A lognormal_distribution random number distribution.
@@ -1994,6 +2198,10 @@ namespace std
        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;
@@ -2068,6 +2276,18 @@ namespace std
                   const param_type& __p)
         { return std::exp(__p.s() * _M_nd(__urng) + __p.m()); }
 
+      /**
+       * @brief Return true if two lognormal distributions have
+       *        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); }
+
       /**
        * @brief Inserts a %lognormal_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -2104,7 +2324,16 @@ namespace std
       std::normal_distribution<result_type> _M_nd;
     };
 
-  
+  /**
+   * @brief Return true if two lognormal distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::lognormal_distribution<_RealType>& __d1,
+              const std::lognormal_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
   /**
    * @brief A gamma continuous distribution for random numbers.
    *
@@ -2146,6 +2375,11 @@ namespace std
        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();
@@ -2232,6 +2466,18 @@ namespace std
        operator()(_UniformRandomNumberGenerator& __urng,
                   const param_type& __p);
 
+      /**
+       * @brief Return true if two gamma distributions have the same
+       *        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); }
+
       /**
        * @brief Inserts a %gamma_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -2267,6 +2513,15 @@ namespace std
       std::normal_distribution<result_type> _M_nd;
     };
 
+  /**
+   * @brief Return true if two gamma distributions are different.
+   */
+   template<typename _RealType>
+    inline bool
+     operator!=(const std::gamma_distribution<_RealType>& __d1,
+               const std::gamma_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A chi_squared_distribution random number distribution.
@@ -2297,6 +2552,10 @@ namespace std
        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;
       };
@@ -2369,6 +2628,17 @@ namespace std
          return 2 * _M_gd(__urng, param_type(__p.n() / 2));
        }
 
+      /**
+       * @brief Return true if two Chi-squared distributions have
+       *        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; }
+
       /**
        * @brief Inserts a %chi_squared_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -2405,6 +2675,15 @@ namespace std
       std::gamma_distribution<result_type> _M_gd;
     };
 
+  /**
+   * @brief Return true if two Chi-squared distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::chi_squared_distribution<_RealType>& __d1,
+              const std::chi_squared_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A cauchy_distribution random number distribution.
@@ -2440,6 +2719,10 @@ namespace std
        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;
@@ -2517,6 +2800,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+   * @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 Return true if two Cauchy distributions have
+   *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::cauchy_distribution<_RealType>& __d1,
+              const std::cauchy_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %cauchy_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -2586,6 +2889,10 @@ namespace std
        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;
@@ -2668,6 +2975,19 @@ namespace std
                  / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m()));
        }
 
+      /**
+       * @brief Return true if two Fisher f distributions have
+       *        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); }
+
       /**
        * @brief Inserts a %fisher_f_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -2704,6 +3024,14 @@ namespace std
       std::gamma_distribution<result_type> _M_gd_x, _M_gd_y;
     };
 
+  /**
+   * @brief Return true if two Fisher f distributions are diferent.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::fisher_f_distribution<_RealType>& __d1,
+              const std::fisher_f_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
 
   /**
    * @brief A student_t_distribution random number distribution.
@@ -2737,6 +3065,10 @@ namespace std
        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;
       };
@@ -2814,6 +3146,18 @@ namespace std
          return _M_nd(__urng) * std::sqrt(__p.n() / __g);
         }
 
+      /**
+       * @brief Return true if two Student t distributions have
+       *        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); }
+
       /**
        * @brief Inserts a %student_t_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -2851,6 +3195,16 @@ namespace std
       std::gamma_distribution<result_type> _M_gd;
     };
 
+  /**
+   * @brief Return true if two Student t distributions are different.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::student_t_distribution<_RealType>& __d1,
+              const std::student_t_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
+
   /* @} */ // group random_distributions_normal
 
   /**
@@ -2886,6 +3240,10 @@ namespace std
       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;
     };
@@ -2976,6 +3334,24 @@ namespace std
     param_type _M_param;
   };
 
+  /**
+   * @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 Return true if two Bernoulli distributions have
+   *        different parameters.
+   */
+  inline bool
+  operator!=(const std::bernoulli_distribution& __d1,
+            const std::bernoulli_distribution& __d2)
+  { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %bernoulli_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -3052,6 +3428,10 @@ namespace std
        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();
@@ -3129,6 +3509,21 @@ namespace std
       max() const
       { return _M_param.t(); }
 
+      /**
+       * @brief Return true if two binomial distributions have
+       *        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)
+#ifdef _GLIBCXX_USE_C99_MATH_TR1
+       { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+#else
+        { return __d1.param() == __d2.param(); }
+#endif
+
       template<typename _UniformRandomNumberGenerator>
        result_type
        operator()(_UniformRandomNumberGenerator& __urng)
@@ -3182,6 +3577,15 @@ namespace std
       std::normal_distribution<double> _M_nd;
     };
 
+  /**
+   * @brief Return true if two binomial distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::binomial_distribution<_IntType>& __d1,
+              const std::binomial_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A discrete geometric random number distribution.
@@ -3218,6 +3622,10 @@ namespace std
        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()
@@ -3297,6 +3705,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+   * @brief Return true if two geometric distributions have
+   *        the same parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::geometric_distribution<_IntType>& __d1,
+              const std::geometric_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+   * @brief Return true if two geometric distributions have
+   *        different parameters.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::geometric_distribution<_IntType>& __d1,
+              const std::geometric_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %geometric_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -3363,6 +3791,10 @@ namespace std
        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;
@@ -3437,6 +3869,17 @@ namespace std
        operator()(_UniformRandomNumberGenerator& __urng,
                   const param_type& __p);
 
+      /**
+       * @brief Return true if two negative binomial distributions have
+       *        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; }
+
       /**
        * @brief Inserts a %negative_binomial_distribution random
        *        number distribution @p __x into the output stream @p __os.
@@ -3474,6 +3917,16 @@ namespace std
       std::gamma_distribution<double> _M_gd;
     };
 
+  /**
+   * @brief Return true if two negative binomial distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::negative_binomial_distribution<_IntType>& __d1,
+              const std::negative_binomial_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
   /* @} */ // group random_distributions_bernoulli
 
   /**
@@ -3516,6 +3969,10 @@ namespace std
        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
@@ -3593,6 +4050,21 @@ namespace std
        operator()(_UniformRandomNumberGenerator& __urng,
                   const param_type& __p);
 
+       /**
+       * @brief Return true if two Poisson distributions have the same
+       *        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)
+#ifdef _GLIBCXX_USE_C99_MATH_TR1
+        { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; }
+#else
+        { return __d1.param() == __d2.param(); }
+#endif
+
       /**
        * @brief Inserts a %poisson_distribution random number distribution
        * @p __x into the output stream @p __os.
@@ -3630,6 +4102,16 @@ namespace std
       std::normal_distribution<double> _M_nd;
     };
 
+  /**
+   * @brief Return true if two Poisson distributions are different.
+   */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::poisson_distribution<_IntType>& __d1,
+              const std::poisson_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
+
   /**
    * @brief An exponential continuous distribution for random numbers.
    *
@@ -3670,6 +4152,10 @@ namespace std
        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;
       };
@@ -3752,6 +4238,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+   * @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 Return true if two exponential distributions have different
+   *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::exponential_distribution<_RealType>& __d1,
+              const std::exponential_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %exponential_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -3820,6 +4326,10 @@ namespace std
        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;
@@ -3900,6 +4410,26 @@ namespace std
       param_type _M_param;
     };
 
+   /**
+    * @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 Return true if two Weibull distributions have different
+    *        parameters.
+    */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::weibull_distribution<_RealType>& __d1,
+              const std::weibull_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %weibull_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -3968,6 +4498,10 @@ namespace std
        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;
@@ -4048,6 +4582,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+    * @brief Return true if two extreme value distributions have the same
+    *        parameters.
+   */
+  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 Return true if two extreme value distributions have different
+    *        parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::extreme_value_distribution<_RealType>& __d1,
+              const std::extreme_value_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
   /**
    * @brief Inserts a %extreme_value_distribution random number distribution
    * @p __x into the output stream @p __os.
@@ -4122,6 +4676,10 @@ namespace std
        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();
@@ -4243,6 +4801,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+    * @brief Return true if two discrete distributions have the same
+    *        parameters.
+    */
+  template<typename _IntType>
+    inline bool
+    operator==(const std::discrete_distribution<_IntType>& __d1,
+              const std::discrete_distribution<_IntType>& __d2)
+    { return __d1.param() == __d2.param(); }
+
+  /**
+    * @brief Return true if two discrete distributions have different
+    *        parameters.
+    */
+  template<typename _IntType>
+    inline bool
+    operator!=(const std::discrete_distribution<_IntType>& __d1,
+              const std::discrete_distribution<_IntType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A piecewise_constant_distribution random number distribution.
@@ -4289,6 +4867,10 @@ namespace std
        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();
@@ -4424,6 +5006,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+    * @brief Return true if two piecewise constant distributions have the
+    *        same parameters.
+   */
+  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 Return true if two piecewise constant distributions have 
+    *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::piecewise_constant_distribution<_RealType>& __d1,
+              const std::piecewise_constant_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /**
    * @brief A piecewise_linear_distribution random number distribution.
@@ -4470,6 +5072,11 @@ namespace std
        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();
@@ -4607,6 +5214,26 @@ namespace std
       param_type _M_param;
     };
 
+  /**
+    * @brief Return true if two piecewise linear distributions have the
+    *        same parameters.
+   */
+  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(); }
+
+  /**
+    * @brief Return true if two piecewise linear distributions have
+    *        different parameters.
+   */
+  template<typename _RealType>
+    inline bool
+    operator!=(const std::piecewise_linear_distribution<_RealType>& __d1,
+              const std::piecewise_linear_distribution<_RealType>& __d2)
+    { return !(__d1 == __d2); }
+
 
   /* @} */ // group random_distributions_poisson
 
index 0bc18e64132c93926011231066cc7649ae1a0e7d..fb2879ccf355722ced8338e2e1da80ada8653d74 100644 (file)
@@ -1627,6 +1627,26 @@ namespace std
        return __ret;
       }
 
+  template<typename _RealType>
+    bool
+    operator==(const std::normal_distribution<_RealType>& __d1,
+              const std::normal_distribution<_RealType>& __d2)
+    {
+      if (__d1._M_param == __d2._M_param
+         && __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;
+    }
+
   template<typename _RealType, typename _CharT, typename _Traits>
     std::basic_ostream<_CharT, _Traits>&
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
diff --git a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..b3e8b97
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.1 Class template bernoulli_distribution [rand.dist.bern.bernoulli]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+  
+  std::bernoulli_distribution u(0.75), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/bernoulli_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..6ed72fa
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.1 Class template bernoulli_distribution [rand.dist.bern.bernoulli]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+  
+  std::bernoulli_distribution u(0.75), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..9002614
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.2 Class template binomial_distribution [rand.dist.bern.bin]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::binomial_distribution<int> u(3, 0.75), v, w;
+  
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..fb05a0d
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.2 Class template binomial_distribution [rand.dist.bern.bin]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::binomial_distribution<int> u(3, 0.75), v, w;
+  
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..068c8ca
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.4 class template cauchy_distribution [rand.dist.norm.cauchy]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::cauchy_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/cauchy_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..de1e6f6
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.4 class template cauchy_distribution [rand.dist.norm.cauchy]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::cauchy_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..e84e104
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.3 Class template chi_squared_distribution [rand.dist.norm.chisq]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::chi_squared_distribution<double> u(1.5), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/chi_squared_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..eb95739
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.3 Class template chi_squared_distribution [rand.dist.norm.chisq]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::chi_squared_distribution<double> u(1.5), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..fff369b
--- /dev/null
@@ -0,0 +1,51 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.4.1 class template discard_block_engine [rand.adapt.disc]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::discard_block_engine
+    <
+    std::subtract_with_carry_engine<unsigned long, 24, 10, 24>,
+    389, 24
+    > u, v;
+
+  VERIFY( !(u != v) );
+
+  u.discard(100);
+  v.discard(100);
+
+  VERIFY( !(u != v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..6ef26c9
--- /dev/null
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.1 Class template discrete_distribution [rand.dist.samp.discrete]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::vector<double> wt = { 0.5, 1.0, 2.5, 1.5, 0.5 };
+  std::discrete_distribution<int> u(wt.begin(), wt.end()), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..2215a70
--- /dev/null
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.1 Class template discrete_distribution [rand.dist.samp.discrete]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::vector<double> wt = { 0.5, 1.0, 2.5, 1.5, 0.5 };
+  std::discrete_distribution<int> u(wt.begin(), wt.end()), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..e4a30bb
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.2 Class template exponential_distribution [rand.dist.pois.exp]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::exponential_distribution<double> u(0.5), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/exponential_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..a3fbc2f
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.2 Class template exponential_distribution [rand.dist.pois.exp]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::exponential_distribution<double> u(0.5), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..85e78a6
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.5 Class template extreme_value_distribution [rand.dist.pois.extreme]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::extreme_value_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) ); 
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/extreme_value_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..dbc65f8
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.5 Class template extreme_value_distribution [rand.dist.pois.extreme]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::extreme_value_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) ); 
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..bedb79e
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.5 Class template fisher_f_distribution [rand.dist.norm.f]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::fisher_f_distribution<double> u(2.0, 3.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/fisher_f_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..ae19853
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.5 Class template fisher_f_distribution [rand.dist.norm.f]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::fisher_f_distribution<double> u(2.0, 3.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..131132f
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.3 Class template gamma_distribution [rand.dist.pois.gamma]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::gamma_distribution<double> u(1.5, 3.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/gamma_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..1fe8057
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.3 Class template gamma_distribution [rand.dist.pois.gamma]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::gamma_distribution<double> u(1.5, 3.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..bd20f92
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.3 Class template geometric_distribution [rand.dist.bern.geom]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::geometric_distribution<int> u(0.75), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/geometric_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..19031cc
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.3 Class template geometric_distribution [rand.dist.bern.geom]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::geometric_distribution<int> u(0.75), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..a1e05a7
--- /dev/null
@@ -0,0 +1,49 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.4.2 class template independent_bits_engine [rand.adapt.bits]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::independent_bits_engine
+    <std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
+     48, uint_fast64_t> u, v;
+
+  VERIFY( !(u != v) );
+
+  u.discard(100);
+  v.discard(100);
+
+  VERIFY( !(u != v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..768837a
--- /dev/null
@@ -0,0 +1,45 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.3.1 class template linear_congruential_engine [rand.eng.lcong]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::minstd_rand0 a;
+  std::minstd_rand0 b;
+  std::minstd_rand0 c(120);
+
+  VERIFY( a != c );
+  VERIFY( !(a != b) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..684c0ca
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.2 Class template lognormal_distribution [rand.dist.norm.lognormal]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::lognormal_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/lognormal_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..ce427e5
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.2 Class template lognormal_distribution [rand.dist.norm.lognormal]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::lognormal_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..94ccb76
--- /dev/null
@@ -0,0 +1,52 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.3.2 Class template mersenne_twister_engine [rand.eng.mers]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::mersenne_twister_engine<
+    unsigned long, 32, 624, 397, 31,
+    0x9908b0dful, 11,
+    0xfffffffful, 7,
+    0x9d2c5680ul, 15,
+    0xefc60000ul, 18, 1812433253ul> u, v;
+
+  VERIFY( !(u != v) );
+
+  u.discard(100);
+  v.discard(100);
+
+  VERIFY( !(u != v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..08ec893
--- /dev/null
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.4 Class template negative_binomial_distribution
+// [rand.dist.bern.negbin]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::negative_binomial_distribution<int> u(3, 0.75), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..86d23e7
--- /dev/null
@@ -0,0 +1,44 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.2.4 Class template negative_binomial_distribution
+// [rand.dist.bern.negbin]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::negative_binomial_distribution<int> u(3, 0.75), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..6dac4b3
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.1 Class template normal_distribution [rand.dist.norm.normal]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::normal_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/normal_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..e3a31f6
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.1 Class template normal_distribution [rand.dist.norm.normal]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::normal_distribution<double> u(5.0, 2.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..fc74cf1
--- /dev/null
@@ -0,0 +1,47 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.2 Class template piecewise_constant_distribution
+// [rand.dist.samp.pconst]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  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, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..dec264d
--- /dev/null
@@ -0,0 +1,47 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.2 Class template piecewise_constant_distribution
+// [rand.dist.samp.pconst]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  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, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..c3510b9
--- /dev/null
@@ -0,0 +1,47 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.3 Class template piecewise_linear_distribution
+// [rand.dist.samp.plinear]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  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 };
+  std::piecewise_linear_distribution<double>
+    u(x.begin(), x.end(), wt.begin()), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..bbb96dc
--- /dev/null
@@ -0,0 +1,47 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.5.3 Class template piecewise_linear_distribution
+// [rand.dist.samp.plinear]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  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 };
+  std::piecewise_linear_distribution<double>
+    u(x.begin(), x.end(), wt.begin()), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..3ded153
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.1 Class template poisson_distribution [rand.dist.pois.poisson]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::poisson_distribution<int> u(5.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..a996dc1
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.1 Class template poisson_distribution [rand.dist.pois.poisson]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::poisson_distribution<int> u(5.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..43fc99f
--- /dev/null
@@ -0,0 +1,51 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.4.1 class template discard_block_engine [rand.adapt.disc]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::shuffle_order_engine
+    <
+      std::linear_congruential_engine<uint_fast32_t,16807UL, 0UL, 2147483647UL>,
+      256
+    > u, v;
+
+  VERIFY( !(u != v) );
+
+  u.discard(100);
+  v.discard(100);
+
+  VERIFY( !(u != v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..5117729
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.6 Class template student_t_distribution [rand.dist.norm.t]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::student_t_distribution<double> u(1.5), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/student_t_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..edead19
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.4.6 Class template student_t_distribution [rand.dist.norm.t]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::student_t_distribution<double> u(1.5), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );  
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/operators/inequal.cc
new file mode 100644 (file)
index 0000000..aa7ec24
--- /dev/null
@@ -0,0 +1,48 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.3.3 Class template subtract_with_carry_engine [rand.eng.sub]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::subtract_with_carry_engine<unsigned long, 24, 10, 24> u;
+  std::subtract_with_carry_engine<unsigned long, 24, 10, 24> v;
+
+  VERIFY( !(u != v) );
+
+  u.discard(100);
+  v.discard(100);
+
+  VERIFY( !(u != v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..288cc0d
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.1.1 Class template uniform_int_distribution [rand.dist_uni]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::uniform_int_distribution<int> u(1, 20), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..48875c3
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.1.1 Class template uniform_int_distribution [rand.dist_uni]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::uniform_int_distribution<int> u(1, 20), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..df27f6c
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.1.2 Class template uniform_real_distribution [rand.dist.uni.real]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::uniform_real_distribution<double> u(-5.0, 5.0), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..a93a4fd
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.1.2 Class template uniform_real_distribution [rand.dist.uni.real]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::uniform_real_distribution<double> u(-5.0, 5.0), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/equal.cc b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/equal.cc
new file mode 100644 (file)
index 0000000..be4201a
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.4 Class template weibull_distribution [rand.dist.pois.weibull]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::weibull_distribution<double> u(2.0, 3.5), v, w;
+
+  VERIFY( v == w );
+  VERIFY( !(u == v) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/inequal.cc b/libstdc++-v3/testsuite/26_numerics/random/weibull_distribution/operators/inequal.cc
new file mode 100644 (file)
index 0000000..44dc1d3
--- /dev/null
@@ -0,0 +1,43 @@
+// { dg-options "-std=c++0x" }
+// { dg-require-cstdint "" }
+//
+// 2010-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
+//
+// Copyright (C) 2010 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 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/>.
+
+// 26.5.8.3.4 Class template weibull_distribution [rand.dist.pois.weibull]
+
+#include <random>
+#include <testsuite_hooks.h>
+
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  std::weibull_distribution<double> u(2.0, 3.5), v, w;
+
+  VERIFY( u != v );
+  VERIFY( !(v != w) );
+}
+
+int main()
+{
+  test01();
+  return 0;
+}