summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp53.C
blob: 688f480d07fc633fd74a68538ad81ba4b206388a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// { dg-do link  }
// GROUPS passed templates membertemplates
template<int N>
struct I {
};

template<class T>
struct A {

  int r;

  template<class T1, class T2>
  void operator()(T1, T2)
  { r = 0; }

  template<int N1, int N2>
  void operator()(I<N1>, I<N2>)
  { r = 1; }
};

int main()
{
    A<float> x;
    I<0> a;
    I<1> b;

    x(a,b);
    if (x.r != 1)
        return 1;

    x(float(), double());
    if (x.r != 0)
        return 1;

    return 0;
}