File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -822,7 +822,9 @@ struct is_template_base_of_impl {
822
822
// / Check if a template is the base of a type. For example:
823
823
// / `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything
824
824
template <template <typename ...> class Base , typename T>
825
- #if defined(PYBIND11_CPP20) || !defined(_MSC_VER) // Sadly, all MSVC versions incl. 2022 need this.
825
+ // Sadly, all MSVC versions incl. 2022 need the workaround, even in C++20 mode.
826
+ // See also: https://github.com/pybind/pybind11/pull/3741
827
+ #if !defined(_MSC_VER)
826
828
using is_template_base_of
827
829
= decltype(is_template_base_of_impl<Base>::check((intrinsic_t <T> *) nullptr ));
828
830
#else
Original file line number Diff line number Diff line change 21
21
// make it version specific, or even remove it later, but considering that
22
22
// 1. C4127 is generally far more distracting than useful for modern template code, and
23
23
// 2. we definitely want to ignore any MSVC warnings originating from Eigen code,
24
- // it is probably best to keep this around indefinitely.
24
+ // it is probably best to keep this around indefinitely.
25
25
#if defined(_MSC_VER)
26
26
# pragma warning(push)
27
27
# pragma warning(disable : 4127) // C4127: conditional expression is constant
28
+ # pragma warning(disable : 5054) // https://github.com/pybind/pybind11/pull/3741
29
+ // C5054: operator '&': deprecated between enumerations of different types
28
30
#endif
29
31
30
32
#include < Eigen/Core>
You can’t perform that action at this time.
0 commit comments