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

Luke Lau via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 21:03:26 PDT 2024


lukel97 wrote:

@mizvekov 

I'm not sure if it's possible to share SPEC sources due to the license, but creduce was able to get it down to this which passed with -fsyntax-only before aa7497a.

```c++
template <int, int> class a;
template <int, int> class b;
class c {
  template <int d, class e, class f, int g>
  void h(const a<d, g> &, const e &, const b<d, g> &, f &);
  template <int d, template <int> class i, class e, class f, int g>
  void h(const i<d> &, e, const b<d, g> &, f);
};
template <int d, int = d> class a;
template <int d, int = d> class b;
template <int d, class e, class f, int g>
void c::h(const a<d, g> &, const e &, const b<d, g> &, f &) {}
template void c::h(const a<3> &, const float &, const b<3> &, float &);

```


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


More information about the cfe-commits mailing list