<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63465>63465</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Invalid "Substitution into constraint expression resulted in a non-constant expression" warning from clang-16 on
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fiesh
</td>
</tr>
</table>
<pre>
The following C++20 code results in the above mentioned error:
```cpp
template <typename, int a, int b> struct c {
template <typename... d>
c(d...)
requires(sizeof...(d) == a * b);
};
template <typename e, int a> struct f : c<e, a, 1> {
using c<e, a, 1>::c;
};
void g(c<double, 2, 1> h) { f<double, 2>(h, 0); }
```
It works with `clang-15` as well as other compilers and started failing with `clang-16`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU9uO4zYM_Rr6hRhDpnxJHvwwmUyAfW5_QLboWK0suZKcdPv1hZzNzl4GMCxCPIfi4UXFaK6OuYfmBM25UFuafegnw3EuBq-_9n_OjJO31t-Nu-Ib0AnoRAJHrxkDx82miMZhmhnV4G-MC7tkvGONHIIPIF9BnEE8_614fOO6Pm4SL6tViRHkW_q6slMLA72hcQnV0xhAvmNMYRsTjgjd6cFF_IxdliVqkO9PzAh00GVZAh2fV4iB_9lM4Ah0iOY_9tMOOGigI4I8gzyjQqBXHDJNfnsQuvN3-7On8YfUPzKeEOQrjiDfdveuqsr-DyFbzPX9HZLLJ1_HTxO4eaPxCnTINO23we5c-h5-3sV0J5x-Ach3oMOcbfFQhznuzw36sWtfEt59-Dvi3aQZc_escteXqoFWoIp4Z2vz6dPMAUe_rMZyiKicxphUSKxxUsZmjb-EaKEVZaF7qY_yqAruq_bQNaKtqrqY-5FolHVFbScGpYSoRS2aSneDmDrdTrowPQmSoiUpurpq6lIcDzwMSjZ1NdVHGqAWvChjS2tvS-nDtTAxbty3sm6bwqqBbdzHn8jxHXcnEOVtCH3mvAzbNUItrIkpfkRJJlnuv7ibskYjEP2xDTGZtOXhzxPgcfQupqDyNPC_a-AYs-uxNKzz1ih03r3sOPUTCojwroLLBZuCX_BZLfSu2ILt55TWmIeDLkCXq0nzNpSjX4AuOcVvx8sa_F88JqDLLiwCXXbh_wcAAP__ffQv4w">