Skip to content

Commit

Permalink
For MSVC 2015 only: also adding the C4127 suppression to test_eigen.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Oct 11, 2021
1 parent de09134 commit 1b72808
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/eigen.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// it is probably best to keep this around indefinitely.
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable: 4127)
# pragma warning(disable: 4127) // C4127: conditional expression is constant
#endif

#include <Eigen/Core>
Expand Down
3 changes: 3 additions & 0 deletions tests/test_eigen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#include <pybind11/stl.h>

#if defined(_MSC_VER)
#if _MSC_VER < 1910 // VS 2015's MSVC
# pragma warning(disable: 4127) // C4127: conditional expression is constant
#endif
# pragma warning(disable: 4996) // C4996: std::unary_negation is deprecated
#endif

Expand Down

0 comments on commit 1b72808

Please sign in to comment.