Eigen & GCC 5 : class std::binder2nd is deprecated -
i restarted working on project has been on hold few months. last time compiled it working fine, without error nor warning. yet when tried compile earlier today got warning
attention : ‘template<class _operation> class std::binder2nd’ deprecated [-wdeprecated-declarations]
this warning literally appears hundreds of time when including eigen/geometry, use on project
in file included [...]/include/eigen/src/core/arraybase.h:109:0, [...]/include/eigen/core:350, [...]/include/eigen/geometry:4, [...]/include/[myproject]/types.hh:8, [...]/include/[myproject]/voronoi.hh:8
since haven't updated eigen (is used 3.2.4 still last update today). however, since last time compiled it, gcc has been updated 5.1.0 (i'm using archlinux)
question:
- is there issue gcc 5.1.0 telling me std::binder2nd deprecated
- should eigen updated ?
- how can silent specific warning without loosing verbosity of build ?
answer
i appreas std::bind2nd
deprecated , a commit has been done solve in eigen. commit not yet merged master branch :/ (and doesn't solve issue std::bind2nd
still present in eigen's code)
bottom line is: eigen's last stable version deprecated
- is there issue gcc 5.1.0 telling me std::binder2nd deprecated
no, c++ standard says it's deprecated in c++11, if compile in c++11 mode supposed deprecated.
- should eigen updated ?
yes. if wants c++17 compatible, std::bind2nd
doesn't exist post-c++14 @ all.
- how can silent specific warning without loosing verbosity of build ?
suppress warning. either compile -wno-deprecated-declarations
on command-line or in source when including eigen headers:
#pragma gcc diagnostic push #pragma gcc diagnostic ignored "-wdeprecated-declarations" #include <eigen/whatever.h> #pragma gcc diagnostic pop
or, other answer says, tell gcc treat eigen headers system headers, happens automatically if in /usr/include
, or included -isystem
, or included header does:
#pragma gcc system_header #include <eigen/whatever.h>
Comments
Post a Comment