[v3] libstdc++/28514

Benjamin Kosnik bkoz@redhat.com
Tue Oct 17 12:39:00 GMT 2006


> overlong line?

Busted! Here's a fix.

2006-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/tr1/random.tcc: Fixup long line.

Index: include/tr1/random.tcc
===================================================================
--- include/tr1/random.tcc	(revision 117824)
+++ include/tr1/random.tcc	(working copy)
@@ -324,6 +324,7 @@
       subtract_with_carry<_IntType, __m, __s, __r>::
       seed(_Gen& __gen, false_type)
       {
+	typedef __detail::__mod<__detail::_UInt32Type, 1, 0, 0> __modu32_type;
 	const int __n = (std::numeric_limits<_UIntType>::digits + 31) / 32;
 
 	for (int __i = 0; __i < long_lag; ++__i)
@@ -332,7 +333,7 @@
 	    _UIntType __factor = 1;
 	    for (int __j = 0; __j < __n; ++__j)
 	      {
-		__tmp += __detail::__mod<__detail::_UInt32Type, 1, 0, 0>(__gen()) * __factor;
+		__tmp += __modu32_type(__gen()) * __factor;
 		__factor *= __detail::_Shift<_UIntType, 32>::__value;
 	      }
 	    _M_x[__i] = __detail::__mod<_UIntType, 1, 0, modulus>(__tmp);




-benjamin



More information about the Libstdc++ mailing list