mizvekov wrote:

Reduction:

```
template <class> struct __promote {
  using type = float;
};
template <class> class complex {};

template <class _Tp>
complex<_Tp> pow(const complex<_Tp> &) {};

template <class _Tp>
complex<typename __promote<_Tp>::type> pow(_Tp) = delete;

using F0 = complex<float> (*)(const complex<float> &);
F0 ptr{pow};
```

This is the same as the enable_if consistency check problem, only applied to 
the return type of a function pointer.
We only so far applied this fix for function calls, but it would be easy to 
extend this to cover return type and function parameters in the other deduction 
contexts: In this example, since we haven't deduced any template parameters 
from the return type, we shouldn't perform consistency check on it.

https://github.com/llvm/llvm-project/pull/100692
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to