Passing a const-reference to blaze::data() results in compiler error
Issue #237
resolved
Example:
#include <blaze/Math.h>
int main(int, char **)
{
blaze::StaticMatrix<double, 3, 2> const m;
data(m); // ERROR
m.data(); // OK
return 0;
}
Comments (5)
-
reporter -
Hi Mikhail!
Thanks a lot for creating this bug report. You are correct, this is obviously an error in Blaze. We will fix the problem immediately.
Best regards,
Klaus!
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Commit c305971 fixes the free
data()
for dense matrices. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.6. - Log in to comment
I believe in this line https://bitbucket.org/blaze-lib/blaze/src/37136e84c08df0d0eaec9eb1eb2901c8b556fcf6/blaze/math/expressions/DenseMatrix.h#lines-213 it should be
typename MT::ElementType const*
instead oftypename MT::ElementType*
.