[Bug libstdc++/59603] std::random_shuffle tries to swap element with itself
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 6 20:38:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59603
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Sat Dec 6 20:38:07 2014
New Revision: 218454
URL: https://gcc.gnu.org/viewcvs?rev=218454&root=gcc&view=rev
Log:
PR libstdc++/59603
* include/bits/stl_algo.h (random_shuffle): Prevent self-swapping.
* testsuite/25_algorithms/random_shuffle/59603.cc: New.
Added:
branches/gcc-4_8-branch/libstdc++-v3/testsuite/25_algorithms/random_shuffle/59603.cc
Modified:
branches/gcc-4_8-branch/libstdc++-v3/ChangeLog
branches/gcc-4_8-branch/libstdc++-v3/include/bits/stl_algo.h
More information about the Gcc-bugs
mailing list