Home | History | Annotate | Download | only in rand.eng.lcong
      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 // template <class UIntType, UIntType a, UIntType c, UIntType m>
     13 //   class linear_congruential_engine;
     14 
     15 // template<class Sseq> explicit linear_congruential_engine(Sseq& q);
     16 
     17 #include <random>
     18 #include <cassert>
     19 
     20 int main()
     21 {
     22     {
     23         unsigned a[] = {3, 5, 7};
     24         std::seed_seq sseq(a, a+3);
     25         std::linear_congruential_engine<unsigned, 5, 7, 11> e1(sseq);
     26         std::linear_congruential_engine<unsigned, 5, 7, 11> e2(4);
     27         assert(e1 == e2);
     28     }
     29 }
     30