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