Skip to content

Rejects-valid with variadic alias template in variadic class template #17042

@efriedma-quic

Description

@efriedma-quic
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++11clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyrejects-valid

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions