| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| template<typename T, typename U> |
| template<typename T, typename U> |
| // Explicitly specialize the members of X<IntHolder, long> to not cause |
| // problems with instantiation, but only provide declarations (not definitions). |
| void X<IntHolder, long>::f(); |
| struct X<IntHolder, long>::Inner; // expected-note{{forward declaration}} |
| IntHolder X<IntHolder, long>::value; |
| IntHolder &test_X_IntHolderInt(X<IntHolder, long> xih) { |
| xih.f(); // okay, uses specialization |
| X<IntHolder, long>::Inner inner; // expected-error {{incomplete}} |
| return X<IntHolder, long>::value; // okay, uses specialization |
| template<class T> struct A { |
| template<> struct A<int> { |
| a.f(16); // A<int>::f must be defined somewhere |
| // explicit specialization syntax not used for a member of |
| // explicitly specialized class template specialization |
| void A<int>::f(int) { /* ... */ } |