diff options
author | 2018-04-03 15:59:30 +0200 | |
---|---|---|
committer | 2018-04-03 15:59:30 +0200 | |
commit | 407e3e2621077a6cd768042c88c652ad75a085ae (patch) | |
tree | d8802c8fb0a1a4f5a61c1a05e4008a8027bf3c5f /Eigen/src | |
parent | 40b4bf3d32265152ae26c2f630f6f70e5d676f3d (diff) |
bug #1532: disable stl::*_negate in C++17 (they are deprecated)
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/functors/StlFunctors.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Eigen/src/Core/functors/StlFunctors.h b/Eigen/src/Core/functors/StlFunctors.h index 6df3fa501..9c1d75850 100644 --- a/Eigen/src/Core/functors/StlFunctors.h +++ b/Eigen/src/Core/functors/StlFunctors.h @@ -83,13 +83,17 @@ struct functor_traits<std::binder1st<T> > { enum { Cost = functor_traits<T>::Cost, PacketAccess = false }; }; #endif +#if (__cplusplus < 201703L) && (EIGEN_COMP_MSVC < 1910) +// std::unary_negate is deprecated since c++17 and will be removed in c++20 template<typename T> struct functor_traits<std::unary_negate<T> > { enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; }; +// std::binary_negate is deprecated since c++17 and will be removed in c++20 template<typename T> struct functor_traits<std::binary_negate<T> > { enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess = false }; }; +#endif #ifdef EIGEN_STDEXT_SUPPORT |