[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

Yi Kong via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 8 00:41:53 PDT 2024


kongy wrote:

There is a case that becomes invalid with this patch, is it expected behaviour?

```
template <char> struct Traits {
  using Type = Traits;
};
template <char... ArgType>
void bar(typename Traits<ArgType>::Type... args) {
  FillVRegs<ArgType...>(args...);
}
template <char... ArgType> void FillVRegs(typename Traits<ArgType>::Type...);
template <char FirstArgType, char SecondArgType>
void FillVRegs(typename Traits<FirstArgType>::Type,
               typename Traits<SecondArgType>::Type);
void foo() { bar<'A', 'A'>; }
```

https://github.com/llvm/llvm-project/pull/100692


More information about the cfe-commits mailing list