From bbc443811448250cf95f119a5f1b7a33cf58eb86 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 28 Jul 2021 22:23:18 -0700 Subject: [PATCH] Adding PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100 (follow-on to PR #3150). --- include/pybind11/detail/init.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pybind11/detail/init.h b/include/pybind11/detail/init.h index 4e639cca55..e54348e892 100644 --- a/include/pybind11/detail/init.h +++ b/include/pybind11/detail/init.h @@ -180,6 +180,7 @@ template < typename D = std::default_delete>, detail::enable_if_t>::value, int> = 0> void construct(value_and_holder &v_h, std::unique_ptr, D> &&unq_ptr, bool need_alias) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias); auto *ptr = unq_ptr.get(); no_nullptr(ptr); if (Class::has_alias && need_alias && !is_alias(ptr)) @@ -215,6 +216,7 @@ template < typename Class, detail::enable_if_t>::value, int> = 0> void construct(value_and_holder &v_h, std::shared_ptr> &&shd_ptr, bool need_alias) { + PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(need_alias); auto *ptr = shd_ptr.get(); no_nullptr(ptr); if (Class::has_alias && need_alias && !is_alias(ptr))