[PATCH] D128750: [c++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions
Roy Jacobson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 26 12:40:49 PDT 2022
royjacobson added a comment.
In D128750#3663161 <https://reviews.llvm.org/D128750#3663161>, @ychen wrote:
> In D128750#3662898 <https://reviews.llvm.org/D128750#3662898>, @royjacobson wrote:
>
>> but in your example with T/U/V we have 3 template parameters that we could reorder in 6 different ways.
>
> But, any reordering of the 6 that does not have consecutive U and V is not valid. Because in the other template, T/U is consecutive and used by X<T, U> in that order. I don't think it is allowed to change the template parameter references in the function parameters.
Sorry for taking the time to answer!
I'm still not sure why it wouldn't be allowed to change template parameter freely. The standard just says 'reordering of the associated template-parameter-list'. I understand it to mean any permutation of them until they match the order of the other function's template parameters (which doesn't even to be the candidate that generated this reversed candidate). I don't understand why U,V must be consecutive - might be I'm missing something, but all forms seem to be valid templates? https://godbolt.org/z/E8Y3Ez3TY
Also, in case it was understood otherwise - I still think this is reasonable and I don't think we should wait until someone gets an answer from CWG - my request for changes is because I want to see better tests coverage.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128750/new/
https://reviews.llvm.org/D128750
More information about the cfe-commits
mailing list