bgrimstad / splinter

Library for multivariate function approximation with splines (B-spline, P-spline, and more) with interfaces to C++, C, Python and MATLAB
Mozilla Public License 2.0
418 stars 115 forks source link

Unable to use in C++17 projects due to Eigen's usage of deprecated standard functionality. #98

Closed acdemiralp closed 6 years ago

acdemiralp commented 6 years ago

Hello,

The packed Eigen version (3.2.8) utilizes std::binder1st, std::binder2nd which have been deprecated in C++14 and removed in C++17.

The Eigen version can probably be adjusted through cmake manually, however this issue still prevents me from creating a standalone conan package for this project.

Do you have any plans to update Eigen to the latest version?

gablank commented 6 years ago

Hello @acdemiralp !

Yes, we are planning on updating Eigen to the newest version. We are also planning on removing Eigen from the interface of the library, so that users are no longer required to have the Eigen headers to use the library. I can't give you a timeline as to when we expect this work to be done, as we rarely have much time to work on this project.

You could try to use your own version of Eigen by setting the EIGEN_DIRECTORY variable when running CMake: cmake splinter_dir -DEIGEN_DIRECTORY=/path/to/eigen. Just remember that you will need to package the Eigen headers as well, as the library currently still use Eigen types in the interface.

gablank commented 6 years ago

One question: What exactly is it that makes you unable to create a package? Must the package compile without any warnings at all, or is it just that the amount of warnings is too great?

bgrimstad commented 6 years ago

SPLINTER v4.0 will ship with Eigen 3.3.4. I have not tested if this issue persists after the update. If so, we will reopen this issue.