[PATCH] D29780: Remove uses of `std::random_shuffle` in the llvm code base

Marshall Clow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 11:59:00 PST 2017


mclow.lists created this revision.

`std::random_shuffle` has been deprecated since C++14, and will be removed in C++17.  The replacement is `std::shuffle`.  Change all of the remaining uses (outside of libc++) to use std::shuffle.

The rationale for doing this in the standard is here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4190

I'd appreciate some feedback on the changes in ListReducer.h; I matched what was there, but was not 100% sure of the intent.


https://reviews.llvm.org/D29780

Files:
  tools/bugpoint/FindBugs.cpp
  tools/bugpoint/ListReducer.h
  tools/llvm-stress/llvm-stress.cpp
  unittests/ADT/TinyPtrVectorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29780.87852.patch
Type: text/x-patch
Size: 4117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/4c9baad4/attachment.bin>


More information about the llvm-commits mailing list