[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 18:06:20 PDT 2022


ychen added a comment.

In D128745#3727770 <https://reviews.llvm.org/D128745#3727770>, @abrachet wrote:

> 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.
>
> Just that input is enough to get the error. I did `clang++ test.cpp -fsyntax-only -fclang-abi-compat=14.0`

Thanks, it works now. I was missing `-fclang-abi-compat=14.0`.


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