Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
miquelramirez opened this issue Jun 30, 2022 · 3 comments · Fixed by #534
Closed

Comments

@miquelramirez
Copy link

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!

@jzmaddock
Copy link
Collaborator

That's strange, I don't see any changes here: https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Core/MathFunctions.h#L257 ?

@mglisse
Copy link

mglisse commented Oct 17, 2022

@jzmaddock
Copy link
Collaborator

OK, good. Is there something that isn't an internal detail we should have specialized instead?

jzmaddock added a commit that referenced this issue Feb 17, 2023
So we no longer rely on Eigen details.
Also improve complex number testing.
Fixes: #479
jzmaddock added a commit that referenced this issue Feb 20, 2023
* Update Eigen interop support.
So we no longer rely on Eigen details.
Also improve complex number testing.
Fixes: #479

* Restrict new Eigen tests to 3.4.90 and later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants