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 //===----------------------------------------------------------------------===//
14 #include <forward_list>
21 #include "min_allocator.h"
23 std::mt19937 randomness;
28 typedef typename C::value_type T;
29 typedef std::vector<T> V;
31 for (int i = 0; i < N; ++i)
33 std::shuffle(v.begin(), v.end(), randomness);
34 C c(v.begin(), v.end());
36 assert(distance(c.begin(), c.end()) == N);
37 typename C::const_iterator j = c.begin();
38 for (int i = 0; i < N; ++i, ++j)
44 for (int i = 0; i < 40; ++i)
45 test<std::forward_list<int> >(i);
46 #if TEST_STD_VER >= 11
47 for (int i = 0; i < 40; ++i)
48 test<std::forward_list<int, min_allocator<int>> >(i);