1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template<RandomAccessIterator Iter>
13 // requires ShuffleIterator<Iter> && LessThanComparable<Iter::value_type>
15 // make_heap(Iter first, Iter last);
21 std::mt19937 randomness;
25 int* ia = new int [N];
26 for (int i = 0; i < N; ++i)
28 std::shuffle(ia, ia+N, randomness);
29 std::make_heap(ia, ia+N);
30 assert(std::is_heap(ia, ia+N));