summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/nttp2.C
blob: 08781daf5169d2c5f4f9cca179f539d25098a143 (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
// Test for nested template template parameter feature

template <template<template <class> class> class TTT> struct C
{
	int f() { return 0; }
};

template <template <class> class TT> struct D
{
	int	a;
};

template <template <class> class TT> struct E
{
	int	a;
	int	b;
};

template <template <template <template<class> class> class> class TTT> 
int g(TTT<E> t)
{
	TTT<D> tt;
	return tt.f();
}

int main()
{
	C<E> c;
	g(c);
}