Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Douglas Gregor | 1a873ae | 2009-03-09 23:48:53 +0000 | [diff] [blame] | 3 | |
| 4 | template<typename T> struct A { }; |
| 5 | |
| 6 | template<typename T, typename U = A<T*> > |
| 7 | struct B : U { }; |
| 8 | |
| 9 | template<> |
| 10 | struct A<int*> { |
| 11 | void foo(); |
| 12 | }; |
| 13 | |
| 14 | template<> |
| 15 | struct A<float*> { |
| 16 | void bar(); |
| 17 | }; |
| 18 | |
| 19 | void test(B<int> *b1, B<float> *b2) { |
| 20 | b1->foo(); |
| 21 | b2->bar(); |
| 22 | } |