Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/conv1.C

raw
1 // { dg-do assemble }
2
3 template <class T>
4 struct S1 {};
5
6 struct S2
7 {
8 template <class T>
9 operator S1<T>*();
10 };
11
12 struct D: public S1<int> {
13 };
14
15 void f()
16 {
17 S2 s;
18 (D*) s; // { dg-error "" } cannot convert
19 }