xref: /llvm-project/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/ctor_sseq.pass.cpp (revision 7fc6a55688c816f5fc1a5481ae7af25be7500356)
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 // template <class UIntType, UIntType a, UIntType c, UIntType m>
12 //   class linear_congruential_engine;
13 
14 // template<class Sseq> explicit linear_congruential_engine(Sseq& q);
15 
16 #include <random>
17 #include <cassert>
18 
19 #include "test_macros.h"
20 
main(int,char **)21 int main(int, char**)
22 {
23     {
24         unsigned a[] = {3, 5, 7};
25         std::seed_seq sseq(a, a+3);
26         std::linear_congruential_engine<unsigned, 5, 7, 11> e1(sseq);
27         std::linear_congruential_engine<unsigned, 5, 7, 11> e2(4);
28         assert(e1 == e2);
29     }
30 
31   return 0;
32 }
33