]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR libstdc++/59603 (std::random_shuffle tries to swap element with itself)
authorJonathan Wakely <jwakely@redhat.com>
Fri, 12 Sep 2014 13:30:35 +0000 (14:30 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 12 Sep 2014 13:30:35 +0000 (14:30 +0100)
commitbc5022d0114c306684f4f21c91716fb91c83fdc6
treeb6136e609c67d0b85b3b2a73e97b8141cf1d97c1
parent139c9e3b9b08cdeedbf9191c792d220499638894
re PR libstdc++/59603 (std::random_shuffle tries to swap element with itself)

PR libstdc++/59603
* include/bits/stl_algo.h (random_shuffle): Prevent self-swapping.
* testsuite/25_algorithms/random_shuffle/59603.cc: New.

From-SVN: r215219
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc [new file with mode: 0644]