You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
333 B
23 lines
333 B
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
template<typename T> struct A { };
|
|
|
|
template<typename T, typename U = A<T*> >
|
|
struct B : U { };
|
|
|
|
template<>
|
|
struct A<int*> {
|
|
void foo();
|
|
};
|
|
|
|
template<>
|
|
struct A<float*> {
|
|
void bar();
|
|
};
|
|
|
|
void test(B<int> *b1, B<float> *b2) {
|
|
b1->foo();
|
|
b2->bar();
|
|
}
|