http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51239

--- Comment #1 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-01 
14:44:10 UTC ---
Here is my understanding of what is happening here.

When we first build the type head<Ts...>, we don't yet know the actual
number of arguments for the 'head' template.  So we should build a
representation of head<Ts...> in which we don't yet try to substitute
Ts... for the parameters of 'head'.

That substitution would happen when 'x' is instantiated with a real
argument pack.  That argument pack would be substituted for Ts... and
yield a real list of arguments that would in turn be applied to 'head'.

Instead, we proceed as if we knew the number of arguments,
and try to apply Ts... to head directly.  And from there on, bad
things happen.

I am currently testing a patch for this.

Reply via email to