2009-03-24 02:24:46 +00:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2009-02-25 23:52:28 +00:00
|
|
|
namespace N {
|
2009-03-03 04:44:36 +00:00
|
|
|
template<typename T> class A { };
|
2009-02-25 23:52:28 +00:00
|
|
|
|
|
|
|
template<> class A<int> { };
|
|
|
|
|
2009-03-19 04:25:59 +00:00
|
|
|
template<> class A<float>; // expected-note{{forward declaration of 'class N::A<float>'}}
|
2009-03-03 04:44:36 +00:00
|
|
|
|
2009-02-25 23:52:28 +00:00
|
|
|
class B : public A<int> { };
|
|
|
|
}
|
|
|
|
|
|
|
|
class C1 : public N::A<int> { };
|
|
|
|
|
2009-03-03 04:44:36 +00:00
|
|
|
class C2 : public N::A<float> { }; // expected-error{{base class has incomplete type}}
|
2009-02-25 23:52:28 +00:00
|
|
|
|
|
|
|
struct D1 {
|
|
|
|
operator N::A<int>();
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace N {
|
|
|
|
struct D2 {
|
|
|
|
operator A<int>();
|
|
|
|
};
|
|
|
|
}
|