Fails to compile with -Wcast-qual (Eigen 3.2.1)
Submitted by Christian Eisenacher
Assigned to Nobody
Link to original bugzilla bug (#533)
Version: 3.1
Description
Eigen/src/Core/Transpose.h:356: error: cast from type ‘const float*’ to type ‘float*’ casts away constness
Problem:
return (bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==(Scalar*)extract_data(src));
Possible solution:
return (bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==const_cast<Scalar*>(extract_data(src)));
Edited by Eigen Bugzilla