summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/nttp2.C
blob: b850f48e86183adcf2bda7feb95eb3f06b138840 (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
// { dg-do run  }
// 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);
}