diff --git a/include/pybind11/eigen.h b/include/pybind11/eigen.h index c0363827c3..d2aac58db9 100644 --- a/include/pybind11/eigen.h +++ b/include/pybind11/eigen.h @@ -17,9 +17,23 @@ #include "numpy.h" +// The C4127 suppression was introduced for Eigen 3.4.0. In theory we could +// make it version specific, or even remove it later, but considering that +// 1. C4127 is generally far more distracting than useful for modern template code, and +// 2. we definitely want to ignore any MSVC warnings originating from Eigen code, +// it is probably best to keep this around indefinitely. +#if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable: 4127) +#endif + #include #include +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + // Eigen prior to 3.2.7 doesn't have proper move constructors--but worse, some classes get implicit // move constructors that break things. We could detect this an explicitly copy, but an extra copy // of matrices seems highly undesirable. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6ebcba9b6b..d4e7b71e1d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -174,9 +174,9 @@ set(PYBIND11_CROSS_MODULE_GIL_TESTS test_gil_scoped.py) set(PYBIND11_EIGEN_REPO "https://gitlab.com/libeigen/eigen.git" CACHE STRING "Eigen repository to use for tests") -# This hash is for 3.3.8, using a hash for security reasons +# This hash is for 3.4.0, using a hash for security reasons set(PYBIND11_EIGEN_VERSION - "dc252fbf00079ccab57948a164b1421703fe4361" + "929bc0e191d0927b1735b9a1ddc0e8b77e3a25ec" CACHE STRING "Eigen version to use for tests") # Check if Eigen is available; if not, remove from PYBIND11_TEST_FILES (but