tg::always_false<D> partially breaks under clang 12
When using clang 12.0.0, all occurences of tg::always_false<D>
where D
is not a type cause a compilation error. I.e. D being an int for dimension checking.
This can be observed mainly for the matrix/eigenvalues.hh
header, where it is frequently used to check the dimension of the matrix.
I've checked the following snipped using godbolt:
template <class...>
constexpr bool always_false = false;
template <int D>
void test()
{
if constexpr (D <= 4)
{
return;
}
else
{
static_assert(always_false<D>, "unsupported dimension");
return;
}
}
Starting with clang 12.0.0 the snippet is not valid anymore.
Edited by Zain Selman