File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1919# pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter
2020# pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
2121# pragma warning(disable: 4800) // warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
22- # pragma warning(disable: 4522) // warning C4522: multiple assignment operators specified
2322# pragma warning(disable: 4505) // warning C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed (PyPy only)
2423#elif defined(__GNUG__) && !defined(__clang__)
2524# pragma GCC diagnostic push
Original file line number Diff line number Diff line change @@ -532,6 +532,10 @@ object object_or_cast(T &&o);
532532// Match a PyObject*, which we want to convert directly to handle via its converting constructor
533533inline handle object_or_cast (PyObject *ptr) { return ptr; }
534534
535+ #if defined(_MSC_VER) && _MSC_VER < 1920
536+ # pragma warning(push)
537+ # pragma warning(disable: 4522) // warning C4522: multiple assignment operators specified
538+ #endif
535539template <typename Policy>
536540class accessor : public object_api <accessor<Policy>> {
537541 using key_type = typename Policy::key_type;
@@ -580,6 +584,9 @@ class accessor : public object_api<accessor<Policy>> {
580584 key_type key;
581585 mutable object cache;
582586};
587+ #if defined(_MSC_VER) && _MSC_VER < 1920
588+ # pragma warning(pop)
589+ #endif
583590
584591PYBIND11_NAMESPACE_BEGIN (accessor_policies)
585592struct obj_attr {
You can’t perform that action at this time.
0 commit comments