blob: cc616ac770fcbc204a627848fd58521b89b4fcb8 [file] [log] [blame]
Douglas Gregor74296542009-02-27 19:31:52 +00001// RUN: clang -fsyntax-only -verify %s
2
3template<typename T, typename U = const T> struct Def1;
4
5template<> struct Def1<int> {
6 void foo();
7};
8
9template<> struct Def1<const int> { // expected-note{{previous definition is here}}
10 void bar();
11};
12
13void test_Def1(Def1<int, const int> *d1, Def1<const int, const int> *d2) {
14 d1->foo();
15 d2->bar();
16}
17
18template<> struct Def1<const int, const int> { }; // expected-error{{redefinition of 'Def1'}}
19