OSDN Git Service

PR c++/58119
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / delete2.C
1 // PR c++/58119
2
3 template <class T>
4 struct A
5 {
6   operator T*();
7   template <class U>
8   operator A<U>();
9 };
10
11 template <class T>
12 struct B
13 {
14   operator T*();
15   template <class U>
16   operator A<U>*();
17 };
18
19 int main()
20 {
21   A<int> a;
22   delete a;
23
24   B<int> b;
25   delete b;                     // { dg-error "template|delete" }
26 }