comparison clang/test/SemaTemplate/class-template-id-2.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
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 }