Description
Bugzilla Link | 16668 |
Version | unspecified |
OS | All |
Attachments | Patch for discussion |
CC | @DougGregor,@zygoloid |
Extended Description
Testcase:
template<int ...Args1> struct A {
template<int ...Args2> using B = A<(Args1+Args2)...>;
};
template<int ...Args> using X = A<1,2,3>::B<Args...>;
Currently prints:
:2:53: error: pack expansion contains parameter pack 'Args2' that has a different length (3 vs. 1) from outer parameter packs
template<int ...Args2> using B = A<(Args1+Args2)...>;
~~~~~ ^
:4:43: note: in instantiation of template type alias 'B' requested here
template<int ...Args> using X = A<1,2,3>::B<Args...>;
^
1 error generated.
I don't see any obvious reason why this wouldn't be allowed by the standard.