[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 12 13:05:19 PDT 2022
ychen added a comment.
Thanks for the review. @aaron.ballman @erichkeane. About the non-trailing pack, I had the impression that DR692 is only about the trailing pack in practice but don't remember the exact wording, so I dig the standardese further.
For partial specialization:
https://eel.is/c++draft/temp.spec.partial#general-9.4
An argument shall not contain an unexpanded pack.
If an argument is a pack expansion ([temp.variadic]), it shall be the last argument in the template argument list.
For the primary template, the rule is the same for the partial ordering purpose (See the second code example of DR1495).
DR692 does not need to consider a non-trailing function parameter pack since it is a non-deduced context.
https://eel.is/c++draft/temp.deduct#type-5.7
The non-deduced contexts are:
...
- A function parameter pack that does not occur at the end of the parameter-declaration-list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128745/new/
https://reviews.llvm.org/D128745
More information about the cfe-commits
mailing list