1// { dg-do assemble  }
2
3template<class T>
4struct Foo { };
5
6template<class T1, class T2>
7struct BT { };
8
9template<class T1, class T2>
10struct BT< Foo<T1>, Foo<T2> > { static const int i = 1; };
11
12template<class T1, class T2>
13struct BT< T1, Foo<T2> > { static const int i = 2; };
14
15template<class T1, class T2>
16struct BT< Foo<T1>, T2 > { static const int i = 3; };
17
18template<class T1, class T2>
19int foo(Foo<T1>, Foo<T2>)
20{
21  return 1;
22}
23
24template<class T1, class T2>
25int foo(T1, Foo<T2>)
26{
27  return 2;
28}
29
30template<class T1, class T2>
31int foo(Foo<T1>, T2)
32{
33  return 3;
34}
35
36void f()
37{
38  BT< double, Foo<int> >::i;
39  BT< Foo<int>, Foo<int> >::i;
40  BT< Foo<int>, float >::i;
41  foo(1.0, Foo<int>());
42  foo(Foo<int>(), Foo<int>());
43  foo(Foo<int>(), 1.0);
44}
45