]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/50510 ([C++0x] transposed variable names in std::seed_seq::generate)
authorJohn Salmon <john.salmon@deshaw.com>
Sat, 24 Sep 2011 22:34:50 +0000 (22:34 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 24 Sep 2011 22:34:50 +0000 (22:34 +0000)
2011-09-24  John Salmon  <john.salmon@deshaw.com>

PR libstdc++/50510
* include/bits/random.tcc (seed_seq::generate): Fix computation.

From-SVN: r179149

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc

index 67643de3ef62389807b3431b223660ead69e2608..9add722014ee393cffbe4e94efff2316574d7cf2 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-24  John Salmon  <john.salmon@deshaw.com>
+
+       PR libstdc++/50510
+       * include/bits/random.tcc (seed_seq::generate): Fix computation.
+
 2011-09-24  John Salmon  <john.salmon@deshaw.com>
 
        PR libstdc++/50509
index d35f2f4cf9a48b9a61f777f5ea04ea50929b8841..0e74848ff3c43efa75b224e87cc24bf38bf9889e 100644 (file)
@@ -2796,8 +2796,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          _Type __r4 = __r3 - __k % __n;
          __r4 = __detail::__mod<_Type,
                   __detail::_Shift<_Type, 32>::__value>(__r4);
-         __begin[(__k + __p) % __n] ^= __r4;
-         __begin[(__k + __q) % __n] ^= __r3;
+         __begin[(__k + __p) % __n] ^= __r3;
+         __begin[(__k + __q) % __n] ^= __r4;
          __begin[__k % __n] = __r4;
        }
     }