1 // RUN: %clang_cc1 -fsyntax-only -verify %s
7 template<typename T
, typename U
>
22 template<typename T
, typename U
>
25 // Explicitly specialize the members of X<IntHolder, long> to not cause
26 // problems with instantiation, but only provide declarations (not definitions).
28 void X
<IntHolder
, long>::f();
31 struct X
<IntHolder
, long>::Inner
; // expected-note{{forward declaration}}
34 IntHolder X
<IntHolder
, long>::value
;
36 IntHolder
&test_X_IntHolderInt(X
<IntHolder
, long> xih
) {
38 xih
.f(); // okay, uses specialization
40 X
<IntHolder
, long>::Inner inner
; // expected-error {{incomplete}}
42 return X
<IntHolder
, long>::value
; // okay, uses specialization
46 template<class T
> struct A
{
47 void f(T
) { /* ... */ }
50 template<> struct A
<int> {
56 a
.f(16); // A<int>::f must be defined somewhere
59 // explicit specialization syntax not used for a member of
60 // explicitly specialized class template specialization
61 void A
<int>::f(int) { /* ... */ }