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 // requirements on parameters
15
16 #include <random>
17
main(int,char **)18 int main(int, char**)
19 {
20 typedef unsigned long long T;
21
22 // expected-error-re@*:* {{static assertion failed due to requirement '1ULL == 0 || 1ULL < 1ULL'{{.*}}linear_congruential_engine invalid parameters}}
23 std::linear_congruential_engine<T, 0, 0, 0> e2;
24 // expected-error-re@*:* {{static assertion failed due to requirement '1ULL == 0 || 1ULL < 1ULL'{{.*}}linear_congruential_engine invalid parameters}}
25 std::linear_congruential_engine<T, 0, 1, 1> e3;
26 std::linear_congruential_engine<T, 1, 0, 1> e4;
27 // expected-error-re@*:* {{static assertion failed due to requirement 'is_unsigned<int>::value'{{.*}}_UIntType must be unsigned type}}
28 std::linear_congruential_engine<int, 0, 0, 0> e5;
29
30 return 0;
31 }
32