111
|
1 // PR c++/66572
|
|
2 // { dg-do compile { target c++11 } }
|
|
3 // { dg-options "-Wlogical-op" }
|
|
4
|
|
5 struct false_type
|
|
6 {
|
|
7 static constexpr bool value = false;
|
|
8 };
|
|
9
|
|
10 struct true_type
|
|
11 {
|
|
12 static constexpr bool value = true;
|
|
13 };
|
|
14
|
|
15 template<typename T>
|
|
16 struct is_unsigned : false_type {};
|
|
17
|
|
18 template<>
|
|
19 struct is_unsigned<unsigned> : true_type {};
|
|
20
|
|
21 template<typename T1, typename T2>
|
|
22 bool foo()
|
|
23 {
|
|
24 return is_unsigned<T1>::value && is_unsigned<T2>::value;
|
|
25 }
|
|
26
|
|
27 int main()
|
|
28 {
|
|
29 foo<unsigned, unsigned>();
|
|
30 }
|