+2009-04-05 Edward M. Smith-Rowland <3dw4rd@verizon.net>
+
+ * include/bits/random.h (struct _ShiftMin1): Fix small typo and
+ thinko.
+ * testsuite/26_numerics/random/mersenne_twister_engine/cons/
+ default.cc: Enable.
+
+2009-04-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/39629 (partial)
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ base_move.cc: Use uint_fast64_t instead of unsigned long.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ seed1.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ seed2.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ base_copy.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ default.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/cons/
+ seed_seq.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/
+ requirements/typedefs.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/
+ operators/equal.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/
+ operators/serialize.cc: Likewise.
+ * testsuite/26_numerics/random/mt19937_64.cc: Use ull.
+
2009-04-03 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1_impl/random: Remove, empty.
bool = __w <static_cast<size_t>
(std::numeric_limits<_UIntType>::digits)>
struct _ShiftMin1
- {
+ {
static const _UIntType __value =
- __gnu_cxx::__numeric_traits<_UIntType>::max;
+ __gnu_cxx::__numeric_traits<_UIntType>::__max;
};
template<typename _UIntType, size_t __w>
struct _ShiftMin1<_UIntType, __w, true>
- { static const _UIntType __value = _UIntType(1) << __w - _UIntType(1); };
+ {
+ static const _UIntType __value =
+ (_UIntType(1) << __w) - _UIntType(1);
+ };
template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool>
struct _Mod;
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
base_engine b;
- std::independent_bits_engine<base_engine, 48, unsigned long> e(b);
+ std::independent_bits_engine<base_engine, 48, uint_fast64_t> e(b);
}
int main()
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
typedef std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
base_engine;
- std::independent_bits_engine<base_engine, 48, unsigned long>
+ std::independent_bits_engine<base_engine, 48, uint_fast64_t>
e(std::move(base_engine()));
}
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
- unsigned long
+ uint_fast64_t
> e;
}
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
- unsigned long
+ uint_fast64_t
> e(seed);
}
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
- unsigned long
+ uint_fast64_t
> e(seed);
}
//
// 2008-12-07 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
<
std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
48,
- unsigned long
+ uint_fast64_t
> e(seq);
}
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
std::independent_bits_engine
<std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
- 48, unsigned long> u, v;
+ 48, uint_fast64_t> u, v;
VERIFY( u == v );
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
std::stringstream str;
std::independent_bits_engine
<std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
- 48, unsigned long> u, v;
+ 48, uint_fast64_t> u, v;
u(); // advance
str << u;
//
// 2008-11-24 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
<
uint_fast64_t, 48, 5, 12
>,
- 48, unsigned long
+ 48, uint_fast64_t
> test_type;
typedef test_type::result_type result_type;
0xefc60000ul, 18, 1812433253ul> x;
VERIFY( x.min() == 0 );
- // XXX VERIFY( x.max() == 4294967295ul);
+ VERIFY( x.max() == 4294967295ul );
VERIFY( x() == 3499211612ul );
}
//
// 2008-11-18 Edward M. Smith-Rowland <3dw4rd@verizon.net>
//
-// Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
std::mt19937_64 a;
a.discard(9999);
- VERIFY( a() == 9981545732273789042ul );
+ VERIFY( a() == 9981545732273789042ull );
}
int main()