blob: d09f52476b312d42638d4ccdf2c518eb90a76dcd [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregor7f43d672009-02-25 23:52:28 +00002namespace N {
Douglas Gregor2943aed2009-03-03 04:44:36 +00003 template<typename T> class A { };
Douglas Gregor7f43d672009-02-25 23:52:28 +00004
5 template<> class A<int> { };
6
John McCall7c2342d2010-03-10 11:27:22 +00007 template<> class A<float>; // expected-note{{forward declaration of 'N::A<float>'}}
Douglas Gregor2943aed2009-03-03 04:44:36 +00008
Douglas Gregor7f43d672009-02-25 23:52:28 +00009 class B : public A<int> { };
10}
11
12class C1 : public N::A<int> { };
13
Douglas Gregor2943aed2009-03-03 04:44:36 +000014class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}
Douglas Gregor7f43d672009-02-25 23:52:28 +000015
16struct D1 {
17 operator N::A<int>();
18};
19
20namespace N {
21 struct D2 {
22 operator A<int>();
23 };
24}