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