We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f9323d commit efcd283Copy full SHA for efcd283
1 file changed
include/boost/python/with_custodian_and_ward.hpp
@@ -84,10 +84,14 @@ struct with_custodian_and_ward_postcall : BasePolicy_
84
static PyObject* postcall(ArgumentPackage const& args_, PyObject* result)
85
{
86
std::size_t arity_ = detail::arity(args_);
87
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
88
+ if ( custodian > arity_ || ward > arity_ )
89
+#else
90
// check if either custodian or ward exceeds the arity
91
// (this weird formulation avoids "always false" warnings
92
// for arity_ = 0)
93
if ( std::max(custodian, ward) > arity_ )
94
+#endif
95
96
PyErr_SetString(
97
PyExc_IndexError
0 commit comments