- changed status to wontfix
IsDenseMatrix and Submatrix
Issue #242
wontfix
I am using BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE
and I got the error
test.cpp:158:3:error: static_assert failed due to requirement
'::blaze::IsDenseMatrix_v<blaze::Submatrix<blaze::CustomMatrix<double, true, true, false, blaze::DynamicMatrix<double, false> >, blaze::unaligned, false, true> &>'
"Non-dense matrix type detected"
BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(MT3);
blaze/blaze/math/constraints/DenseMatrix.h:62:4: note: expanded from macro 'BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE'
static_assert( ::blaze::IsDenseMatrix_v<T>, "Non-dense matrix type detected" )
for the type '::blaze::IsDenseMatrix_v<blaze::Submatrix<blaze::CustomMatrix<double, true, true, false, blaze::DynamicMatrix<double, false> >, blaze::unaligned, false, true> &>
. Is this expected bahavior? It worked around v3.3.
Comments (1)
-
- Log in to comment
Hi Jannik!
Thanks for creating issue. As the following test code proves, both the type trait as well as the constraint work perfectly:
From the error message, however, I get the information that you are asking whether a reference to a submatrix IS-A
DenseMatrix
:A reference (or pointer) to a dense matrix type is not considered a dense matrix type itself. When using
std::remove_reference
orblaze::RemoveReference
on the type the code will compile cleanly.The erroneous behavior of the
IsDenseMatrix
type trait (along with many similar type traits) was fixed with commit 2728d4d, which as officially released in Blaze 3.5. Before, references as well as types with conversion operators would erroneously be flagged as dense matrix types.I hope this helps, Thanks again for creating the issue,
Best regards,
Klaus!