This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 533

Summary: Fails to compile with -Wcast-qual (Eigen 3.2.1)
Product: Eigen Reporter: Christian Eisenacher <Christian.Eisenacher>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Status: RESOLVED FIXED    
Severity: Unknown CC: gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: 3.1   
Hardware: All   
OS: All   
Whiteboard:

Description Christian Eisenacher 2012-11-30 00:59:49 UTC
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)));
Comment 1 Gael Guennebaud 2012-12-16 20:37:33 UTC
https://bitbucket.org/eigen/eigen/changeset/45efb1ce0f2b/
changeset:   45efb1ce0f2b
branch:      3.1
user:        ggael
date:        2012-12-16 20:36:59
summary:     Fix bug 533: add some missing const qualifiers (was already fixed in devel branch)
Comment 2 Nobody 2019-12-04 11:58:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/533.