diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
| commit | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (patch) | |
| tree | 051bdb57b1ac6ee143f61ddbb47bd0da619f6f0c /test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp | |
| parent | 868847c6900e575417c03bced6e562b3af891318 (diff) | |
Notes
Diffstat (limited to 'test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp')
| -rw-r--r-- | test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp b/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp index 2a20cac0b79b..777461023e7d 100644 --- a/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp +++ b/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp @@ -19,10 +19,13 @@ // merge(InIter1 first1, InIter1 last1, InIter2 first2, InIter2 last2, OutIter result); #include <algorithm> +#include <random> #include <cassert> #include "test_iterators.h" +std::mt19937 randomness; + template <class InIter1, class InIter2, class OutIter> void test() @@ -53,7 +56,7 @@ test() int* ic = new int[2*N]; for (unsigned i = 0; i < 2*N; ++i) ic[i] = i; - std::random_shuffle(ic, ic+2*N); + std::shuffle(ic, ic+2*N, randomness); std::copy(ic, ic+N, ia); std::copy(ic+N, ic+2*N, ib); std::sort(ia, ia+N); |
