aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ttp36.C
blob: 976bc0e603d65f47f24f44f967e1125c47e91c14 (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
template<int T, class U = int> class D
{
	public:
		int f();
};

template<int T, class U> int D<T,U>::f()
{
	return T+sizeof(U);
}

template<template<int> class D,class E> class C
{
		D<1> d;
	public:
		int f() { return d.f(); }
};

template<template<int> class D> int f(D<1> &d1)
{
	d1.f();
	return 0;
}

int main()
{
	D<1> c1;
	f(c1);
}