diff --git a/include/boost/python/detail/unwind_type.hpp b/include/boost/python/detail/unwind_type.hpp index add3615a..e8ccd0c8 100644 --- a/include/boost/python/detail/unwind_type.hpp +++ b/include/boost/python/detail/unwind_type.hpp @@ -141,9 +141,12 @@ inline typename Generator::result_type unwind_type(type*p = 0, Generator* = 0) { BOOST_STATIC_CONSTANT(int, indirection - = (pointer_ * is_pointer::value) - | (reference_ * is_reference::value) - | (reference_to_pointer_ * is_reference_to_pointer::value)); + = (is_pointer::value ? pointer_ : 0) + + (is_reference_to_pointer::value + ? reference_to_pointer_ + : is_reference::value + ? reference_ + : 0)); return unwind_helper2::execute((U(*)())0,(Generator*)0); }