1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <random>
10 
11 // class seed_seq;
12 
13 // template<class InputIterator>
14 //     seed_seq(InputIterator begin, InputIterator end);
15 
16 #include <random>
17 #include <cassert>
18 
19 int main(int, char**)
20 {
21     unsigned a[5] = {5, 4, 3, 2, 1};
22     std::seed_seq s(a, a+5);
23     assert(s.size() == 5);
24     unsigned b[5] = {0};
25     s.param(b);
26     assert(b[0] == 5);
27     assert(b[1] == 4);
28     assert(b[2] == 3);
29     assert(b[3] == 2);
30     assert(b[4] == 1);
31 
32   return 0;
33 }
34