mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
bug #1276: remove std::binder* in C++11
This commit is contained in:
parent
ab2a3e3c1c
commit
3745f0808c
@ -969,6 +969,8 @@ template<typename T>
|
||||
struct functor_traits<std::not_equal_to<T> >
|
||||
{ enum { Cost = 1, PacketAccess = false }; };
|
||||
|
||||
#if(__cplusplus < 201103L)
|
||||
// std::binder* are deprecated since c++11 and will be removed in c++17
|
||||
template<typename T>
|
||||
struct functor_traits<std::binder2nd<T> >
|
||||
{ enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; };
|
||||
@ -976,6 +978,7 @@ struct functor_traits<std::binder2nd<T> >
|
||||
template<typename T>
|
||||
struct functor_traits<std::binder1st<T> >
|
||||
{ enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; };
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
struct functor_traits<std::unary_negate<T> >
|
||||
|
@ -164,9 +164,12 @@ template<typename MatrixType> 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()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
|
||||
VERIFY( !(m1.cwise()<m1bis.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
|
||||
VERIFY( !(m1.cwise()>m1bis.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
|
||||
#endif
|
||||
|
||||
cwiseops_real_only(m1, m2, m3, mones);
|
||||
}
|
||||
|
@ -137,9 +137,12 @@ template<typename MatrixType> 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()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
|
||||
VERIFY( !(m1.cwise()<m1.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
|
||||
VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_eigen2_cwiseop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user