1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <random>
11
12 // class seed_seq;
13
14 // template<class InputIterator>
15 // seed_seq(InputIterator begin, InputIterator end);
16
17 #include <random>
18 #include <cassert>
19
main()20 int main()
21 {
22 unsigned a[5] = {5, 4, 3, 2, 1};
23 std::seed_seq s(a, a+5);
24 assert(s.size() == 5);
25 unsigned b[5] = {0};
26 s.param(b);
27 assert(b[0] == 5);
28 assert(b[1] == 4);
29 assert(b[2] == 3);
30 assert(b[3] == 2);
31 assert(b[4] == 1);
32 }
33