| 1 |
// { dg-do run } |
| 2 |
// Test for nested template template parameter feature |
| 3 |
|
| 4 |
template <template<template <class> class> class TTT> struct C |
| 5 |
{ |
| 6 |
int f() { return 0; } |
| 7 |
}; |
| 8 |
|
| 9 |
template <template <class> class TT> struct D |
| 10 |
{ |
| 11 |
int a; |
| 12 |
}; |
| 13 |
|
| 14 |
template <template <class> class TT> struct E |
| 15 |
{ |
| 16 |
int a; |
| 17 |
int b; |
| 18 |
}; |
| 19 |
|
| 20 |
template <template <template <template<class> class> class> class TTT> |
| 21 |
int g(TTT<E> t) |
| 22 |
{ |
| 23 |
TTT<D> tt; |
| 24 |
return tt.f(); |
| 25 |
} |
| 26 |
|
| 27 |
int main() |
| 28 |
{ |
| 29 |
C<E> c; |
| 30 |
g(c); |
| 31 |
} |