Debian Codegraph @

gcc/testsuite/g++.dg/parse/tmpl-tmpl-operator1.C

raw
1 // PR c++/8857
2 // Origin: Martin v. Loewis <[email protected]>
3 // { dg-do compile }
4
5 template <typename T> struct A
6 {
7 template <typename U> operator U() { return sizeof(U); }
8 };
9
10 template <typename T> struct B
11 {
12 template <template <typename U> class X> operator X<double>() { return X<double>(); }
13 };
14
15 int main()
16 {
17 A<double> a;
18 B<long> b;
19 a = b;
20 }