If this is possible, one can index into a variadic template parameter pack without recursion. However, GCC is refusing to pick up my partial specialization here:
<
AFAICT, the rules for matching partial specializations are the same as the rules type deduction of function parameters. And §14.8.2.1/1 says the following:
For a function parameter pack that occurs at the end of the parameter-declaration-list, the type
Aof each remaining argument of the call is compared with the typePof the declarator-id of the function parameter pack. Each comparison deduces template arguments for subsequent positions in the template parameter packs expanded by the function parameter pack. For a function parameter pack that does not occur at the end of the parameter-declaration-list, the type of the parameter pack is a non-deduced context.
So the packs TL and IL cannot be deduced in this case, and the partial specialization is not picked.