[PATCH] D128745: [Sema] fix trailing parameter pack handling for function template partial ordering

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 6 16:11:59 PDT 2022


ychen added a comment.

In D128745#3632850 <https://reviews.llvm.org/D128745#3632850>, @aaron.ballman wrote:

> Thank you for working on this! Can you please add more details to the patch summary about the changes?

Thanks for taking a look.

This was intended to correctly implement https://eel.is/c++draft/temp.deduct.partial#11. The test case is from https://eel.is/c++draft/temp.func.order#example-4.

  If, after considering the above, function template F is at least as specialized as function template G and vice-versa, and if G has a trailing function parameter pack for which F does not have a corresponding parameter, and if F does not have a trailing function parameter pack, then F is more specialized than G.

It looks like this is not too far from implementing DR692. I'll go ahead and include the necessary change for fixing the `template parameter packs` case.


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