This bugzilla service is closed. All entries have been migrated to
Bug 1461 - Map<const Quaterniond> compile error
Summary: Map<const Quaterniond> compile error
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.3 (current stable)
Hardware: x86 - 64-bit Linux
: Normal Unknown
Assignee: Nobody
Depends on:
Reported: 2017-08-11 04:55 UTC by Huang Qinjin
Modified: 2019-12-04 17:09 UTC (History)
4 users (show)


Description Huang Qinjin 2017-08-11 04:55:17 UTC
With g++ 5.4 and eigen 3.3.4 on ubuntu 16.04

    const double d[4] = {0, 0, 0, 1};

    Map<const Vector4d> v(d);
    double s = v.w();             // ok

    Map<const Quaterniond> q(d);
    double w = q.w();             // compile error

/usr/local/include/eigen3/Eigen/src/Geometry/Quaternion.h:76:84: error: binding ‘const Scalar {aka const double}’ to reference of type ‘Eigen::QuaternionBase<Eigen::Map<const Eigen::Quaternion<double> > >::Scalar& {aka double&}’ discards qualifiers
   EIGEN_DEVICE_FUNC inline Scalar& w() { return this->derived().coeffs().coeffRef(3); }
Comment 2 Nobody 2019-12-04 17:09:44 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.