summaryrefslogtreecommitdiffstats
path: root/test/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
blob: 914f851d09cdc2a930f0aef5388f77d7edee1fde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <algorithm>

// template<RandomAccessIterator Iter> 
//   requires ShuffleIterator<Iter> 
//   void
//   random_shuffle(Iter first, Iter last);

#include <algorithm>

#include "../../iterators.h"

int main()
{
    int ia[] = {1, 2, 3, 4};
    const unsigned sa = sizeof(ia)/sizeof(ia[0]);
    std::random_shuffle(ia, ia+sa);
}