Skip to content

Commit efcd283

Browse files
author
Ralf W. Grosse-Kunstleve
committed
Visual C++ 6 compatibility
[SVN r32288]
1 parent 2f9323d commit efcd283

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/boost/python/with_custodian_and_ward.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ struct with_custodian_and_ward_postcall : BasePolicy_
8484
static PyObject* postcall(ArgumentPackage const& args_, PyObject* result)
8585
{
8686
std::size_t arity_ = detail::arity(args_);
87+
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
88+
if ( custodian > arity_ || ward > arity_ )
89+
#else
8790
// check if either custodian or ward exceeds the arity
8891
// (this weird formulation avoids "always false" warnings
8992
// for arity_ = 0)
9093
if ( std::max(custodian, ward) > arity_ )
94+
#endif
9195
{
9296
PyErr_SetString(
9397
PyExc_IndexError

0 commit comments

Comments
 (0)