summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/tmpl-tmpl-operator1.C
blob: dcf2852d1e3dfa29d9d1e1d56eddd721561d668b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/8857
// Origin: Martin v. Loewis <loewis@informatik.hu-berlin.de>
// { dg-do compile }

template <typename T> struct A
{
    template <typename U> operator U() { return sizeof(U); }
};

template <typename T> struct B
{
    template <template <typename U> class X> operator X<double>() { return X<double>(); }
};

int main()
{
  A<double> a;
  B<long> b;
  a = b;
}