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

Luke Lau via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 02:44:58 PDT 2024


lukel97 wrote:

Here's the version without the rename pass
```c++
template <int, int> class DoFHandler;
template <int, int> class FiniteElement;
class FETools {
  template <int dim, class InVector, class OutVector, int spacedim>
  void back_interpolate(const DoFHandler<dim, spacedim> &, const InVector &,
                        const FiniteElement<dim, spacedim> &, OutVector &);
  template <int dim, template <int> class DH, class InVector, class OutVector,
            int spacedim>
  void back_interpolate(const DH<dim> &, InVector,
                        const FiniteElement<dim, spacedim> &, OutVector);
};
template <int dim, int = dim> class DoFHandler;
template <int dim, int = dim> class FiniteElement;
template <int dim, class InVector, class OutVector, int spacedim>
void FETools::back_interpolate(const DoFHandler<dim, spacedim> &,
                               const InVector &,
                               const FiniteElement<dim, spacedim> &,
                               OutVector &) {}
template void FETools::back_interpolate(const DoFHandler<3> &, const double &,
                                        const FiniteElement<3> &, double &);

```

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


More information about the cfe-commits mailing list