Open
Description
template<int x> int a[] = {1,2,3};
static_assert(a<1> + 1 - a<1> == 1);
<source>:2:15: error: static assertion expression is not an integral constant expression
2 | static_assert(a<1> + 1 - a<1> == 1);
| ^~~~~~~~~~~~~~~~~~~~
<source>:2:20: note: indexing of array without known bound is not allowed in a constant expression
2 | static_assert(a<1> + 1 - a<1> == 1);
| ^
1 error generated.
This seems wrong; I think referring to the array like this should force the computation of the correct type.