gcc/testsuite/g++.dg/cpp0x/variadic96.C
raw| 1 | // Contributed by Dodji Seketeli <[email protected]> |
| 2 | // Origin: PR c++/41785 |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | |
| 5 | struct a {}; |
| 6 | |
| 7 | template < typename T, typename ENCLOSING > |
| 8 | struct base; |
| 9 | |
| 10 | template < typename... T > |
| 11 | struct derived |
| 12 | : public base< T, derived< T... > >... |
| 13 | {}; |
| 14 | |
| 15 | template < typename... T> |
| 16 | struct base< a, derived< T... > > |
| 17 | { |
| 18 | typedef derived< T... > |
| 19 | Derived; |
| 20 | }; |
| 21 | |
| 22 | int main() |
| 23 | { |
| 24 | derived< a > instance; |
| 25 | } |
| 26 |