1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
---|---|
2 | namespace N { |
3 | template<typename T> class A { }; |
4 | |
5 | template<> class A<int> { }; |
6 | |
7 | template<> class A<float>; // expected-note{{forward declaration of 'N::A<float>'}} |
8 | |
9 | class B : public A<int> { }; |
10 | } |
11 | |
12 | class C1 : public N::A<int> { }; |
13 | |
14 | class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}} |
15 | |
16 | struct D1 { |
17 | operator N::A<int>(); |
18 | }; |
19 | |
20 | namespace N { |
21 | struct D2 { |
22 | operator A<int>(); |
23 | }; |
24 | } |
25 |