blob: 76189ea90bfb6fbb63ed2987c968f62dcaf35129 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Douglas Gregor1a873ae2009-03-09 23:48:53 +00003
4template<typename T> struct A { };
5
6template<typename T, typename U = A<T*> >
7 struct B : U { };
8
9template<>
10struct A<int*> {
11 void foo();
12};
13
14template<>
15struct A<float*> {
16 void bar();
17};
18
19void test(B<int> *b1, B<float> *b2) {
20 b1->foo();
21 b2->bar();
22}