1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<typename T
, typename U
>
5 static const int value
= 0;
8 template<typename T
, typename U
>
10 static const int value
= 1;
15 static const int value
= 2;
19 struct X1
<const T
*, const T
*> {
20 static const int value
= 3;
23 int array0
[X1
<int, int>::value
== 0? 1 : -1];
24 int array1
[X1
<int*, float*>::value
== 1? 1 : -1];
25 int array2
[X1
<int*, int*>::value
== 2? 1 : -1];
26 typedef const int* CIP
;
27 int array3
[X1
<const int*, CIP
>::value
== 3? 1 : -1];
29 template<typename T
, typename U
>
32 template<typename T
, typename U
>
33 struct X2
<T
*, U
> { }; // expected-note{{matches}}
35 template<typename T
, typename U
>
36 struct X2
<T
, U
*> { }; // expected-note{{matches}}
38 template<typename T
, typename U
>
39 struct X2
<const T
*, const U
*> { };
41 X2
<int*, int*> x2a
; // expected-error{{ambiguous}}
42 X2
<const int*, const int*> x2b
;