Skip to content

Compatibility of boost.multiprecision Eigen support with eigen-git-mirror/master #479

Description

@miquelramirez

Hello @jzmaddock,

This is not so much a bug report as a heads up on what potentially could be a future incompatibility with newer versions of Eigen.

I have run into the following issue when using the latest revision of boost/multiprecision/eigen.hpp and Eigen master branch, under g++11 (with the C++17 mode enabled):

boost/multiprecision/eigen.hpp:247:12: error: redeclared with 2 template parameters
  247 |     struct conj_impl;
      |            ^~~~~~~~~
....
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:261:34: note: previous declaration ‘template<class Scalar> struct Eigen::internal::conj_impl’ used 1 template parameter
  261 | template<typename Scalar> struct conj_impl : conj_default_impl<Scalar> {};
      |                                  ^~~~~~~~~
...
boost/multiprecision/eigen.hpp:256:94: error: wrong number of template arguments (2, should be 1)
  256 | struct conj_impl<boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, true>
      |                                                                                              ^
In file included from /usr/local/include/eigen3/Eigen/Core:159,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
....
/usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:261:34: note: provided for ‘template<class Scalar> struct Eigen::internal::conj_impl’
  261 | template<typename Scalar> struct conj_impl : conj_default_impl<Scalar> {};
      |                                  ^~~~~~~~~
/

Eigen::internal::conj_impl is currently defined by Eigen as a single argument template. Removing the extra template argument here and here produces a correct build, but I haven't run the boost tests.

Thanks very much for maintaining this very useful component of boost!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions