diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h index 5f14c6587..5a1b2f28a 100644 --- a/Eigen/src/Core/Functors.h +++ b/Eigen/src/Core/Functors.h @@ -969,6 +969,8 @@ template struct functor_traits > { enum { Cost = 1, PacketAccess = false }; }; +#if(__cplusplus < 201103L) +// std::binder* are deprecated since c++11 and will be removed in c++17 template struct functor_traits > { enum { Cost = functor_traits::Cost, PacketAccess = false }; }; @@ -976,6 +978,7 @@ struct functor_traits > template struct functor_traits > { enum { Cost = functor_traits::Cost, PacketAccess = false }; }; +#endif template struct functor_traits > diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index e3361da17..d13002cae 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -164,9 +164,12 @@ template void cwiseops(const MatrixType& m) VERIFY( (m1.cwise().min(m2).cwise() < (m1+mones)).all() ); VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() ); +#if(__cplusplus < 201103L) +// std::binder* are deprecated since c++11 and will be removed in c++17 VERIFY( (m1.cwise()(), Scalar(1)))).all() ); VERIFY( !(m1.cwise()(), Scalar(1)))).all() ); VERIFY( !(m1.cwise()>m1bis.unaryExpr(bind2nd(plus(), Scalar(1)))).any() ); +#endif cwiseops_real_only(m1, m2, m3, mones); } diff --git a/test/eigen2/eigen2_cwiseop.cpp b/test/eigen2/eigen2_cwiseop.cpp index 22e1cc342..a36edd473 100644 --- a/test/eigen2/eigen2_cwiseop.cpp +++ b/test/eigen2/eigen2_cwiseop.cpp @@ -137,9 +137,12 @@ template void cwiseops(const MatrixType& m) VERIFY( (m1.cwise().min(m2).cwise() < (m1+mones)).all() ); VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() ); +#if(__cplusplus < 201103L) +// std::binder* are deprecated since c++11 and will be removed in c++17 VERIFY( (m1.cwise()(), Scalar(1)))).all() ); VERIFY( !(m1.cwise()(), Scalar(1)))).all() ); VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus(), Scalar(1)))).any() ); +#endif } void test_eigen2_cwiseop()