https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116223
Bug ID: 116223
Summary: GCC rejects program involving integral conversion in
non-type template parameter with auto
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jlame646 at gmail dot com
Target Milestone: ---
The following program is rejected by gcc latest version Looks like a
regression.
```
#include <iostream>
template <int T> struct A { int value = T; };
template <unsigned char X> using B = A<X>;
template <auto X>
void foo(B<X>& mat) noexcept
{
std::cout << mat.value << "\n";
}
int main()
{
A<2> mat;
foo(mat);
}
```