25 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2namespace 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 12class C1 : public N::A<int> { };13 14class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}15 16struct D1 {17 operator N::A<int>();18};19 20namespace N {21 struct D2 {22 operator A<int>();23 };24}25