[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 Aug 16 17:46:22 PDT 2022


ychen added a comment.

In D128745#3727715 <https://reviews.llvm.org/D128745#3727715>, @ychen wrote:

> In D128745#3727697 <https://reviews.llvm.org/D128745#3727697>, @abrachet wrote:
>
>> This is breaking us.
>>
>>   template <typename T, typename... Ts> struct S; // #1
>>   
>>   template <typename T> struct S<T> {}; // #2
>>
>> The following compiled before but is now broken, (we use `-fclang-abi-compat=13.0`). We get a warning from `-Winvalid-partial-specialization`
>>
>> This change _does_ make https://eel.is/c++draft/temp.func.order#example-5 work, ie for function overload resolution but regresses the type deduction example above.
>>
>> There seem to be examples in the standard that suggest #2 is more specialized. @mcgrathr found https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1432 and https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1395 among others. WDYT?
>
> I tried your test case but was unable to reproduce the issue. Is this the complete test case? I'm asking because the provided test case does not involve deduction.

Or do you mean the duction for partial ordering, then I did a simple `S<int> a` which seems fine?


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