This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/59603] std::random_shuffle tries to swap element with itself


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]