C++17 STL warnings: deprecated std::unary_negate and std::binary_negate
Submitted by pat..@..il.com
Assigned to Nobody
Link to original bugzilla bug (#1532)
Version: 3.3 (current stable)
Description
std::unary_negate and std::binary_negate have been deprecated in C++17. VS2017 gives the following compiler warnings when compiled in C++17 mode (/std:c++17):
1>c:\users\patrik\vcpkg\installed\x64-windows\include\eigen\src\core\functors\stlfunctors.h(87): warning C4996: 'std::unary_negate<_Fn>': warning STL4008: std::not1(), std::not2(), std::unary_negate, and std::binary_negate are deprecated in C++17. They are superseded by std::not_fn(). You can define _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
1>c:\users\patrik\vcpkg\installed\x64-windows\include\eigen\src\core\functors\stlfunctors.h(91): warning C4996: 'std::binary_negate<_Fn>': warning STL4008: std::not1(), std::not2(), std::unary_negate, and std::binary_negate are deprecated in C++17. They are superseded by std::not_fn(). You can define _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
I think it would be really nice to update this code to make Eigen warnings-free again.