sp_matrix_base.h:5522:25: error: static assertion expression is not an integral constant expression
In file included from sp_gradient_test.cc:61:
In file included from ./submat.h:51:
In file included from ./sp_gradient.h:53:
./sp_matrix_base.h:5522:25: error: static assertion expression is not an integral constant expression
static_assert(A.iNumColsStatic == 1);
^~~~~~~~~~~~~~~~~~~~~
sp_gradient_test.cc:607:52: note: in instantiation of function template specialization 'sp_grad::SubColVector<4, 1, 3, double, Vec6>' requested here
SpColVector<doublereal, 3> u2 = A * SubColVector<4, 1, 3>(gb6) + Transpose(C) * SubColVector<1, 1, 3>(gb6);
^
./sp_matrix_base.h:5522:25: note: function parameter 'A' with unknown value cannot be used in a constant expression
static_assert(A.iNumColsStatic == 1);
^
./sp_matrix_base.h:5521:61: note: declared here
SubColVector(const SpMatElemExprBase<ValueType, Expr>& A) {
^
./sp_matrix_base.h:5522:25: error: static assertion expression is not an integral constant expression
static_assert(A.iNumColsStatic == 1);
^~~~~~~~~~~~~~~~~~~~~
The same problem is also in sp_gradient_expr.h with these asserts:
static_assert(u.dGetDeriv() == 0., "u must be a scalar constant");
static_assert(v.dGetDeriv() == 0., "v must be a scalar constant");
Revision: 64b735b5
clang-15
FreeBSD 13.2
Edited by Yuri Vic