summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/template15.C
blob: b1530201b4a94ce2209de9b25ad675cd7e3f3984 (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
// { dg-do run  }
// PRMS Id: 2139
// Bug: g++ tries to instantiate the template with types on the function
// obstack and fails.

template<class T>
class X {
public:
    X(int) { }

    T x;
};

class A { };

int main()
{
    int i;
    X<int> xi(i);
    X<double> xd(i);
    
    X<int (*)(int, void *)> fp0(i);
    X<int (*)(int, char, double)> fp1(i);
    X<int (*)(int, double**, void *)> fp2(i);

    X<int (A::*)()> mp0 (i);
    X<int A::*> mp1 (i);
}