On Wed, Jul 17, 2013 at 5:43 PM, Eli Friedman <[email protected]>wrote:

> Patch attached.  Fixes PR16646.  The concept is that when substitution
> replaces a pack with another pack, we don't want to expand the pack
> immediately: we want to expand it at the same level as the original
> pack.
>

How do we ensure that the we retain a pack expansion around the transformed
entity?


> I'm not confident that this patch is correct, though: just stripping
> off the PackExpansionType in the middle of instantiation seems weird.
> Also, I'm not sure what other tests would be relevant.


The patch only covers type template parameters; presumably, the same issue
applies to non-type template parameters and template template parameters?

Does this correctly handle expanding the pack into a fixed set of
parameters and a pack, in cases like:

template<typename ...Ts> struct S {};
template<typename ...Ts> using X = S<S<Ts>...>;
template<typename ...Ts> void f(X<int, Ts...> x);
void g() { f(X<int, int, int>()); }

? (I think it should, but this seems worth testing.)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to