This bugzilla service is closed. All entries have been migrated to
Bug 533 - Fails to compile with -Wcast-qual (Eigen 3.2.1)
Summary: Fails to compile with -Wcast-qual (Eigen 3.2.1)
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.1
Hardware: All All
: Normal Unknown
Assignee: Nobody
Depends on:
Reported: 2012-11-30 00:59 UTC by Christian Eisenacher
Modified: 2019-12-04 11:58 UTC (History)
2 users (show)


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

    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
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'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:

Note You need to log in before you can comment on or make changes to this bug.