diff --git a/include/boost/python/to_python_indirect.hpp b/include/boost/python/to_python_indirect.hpp index 306b3246..7b77f5ff 100644 --- a/include/boost/python/to_python_indirect.hpp +++ b/include/boost/python/to_python_indirect.hpp @@ -10,6 +10,7 @@ # include # include # include +# include # include namespace boost { namespace python { @@ -34,8 +35,15 @@ namespace detail template static result_type execute(T* p) { - return new objects::pointer_holder, T>( - std::auto_ptr(p)); + // can't use auto_ptr with Intel 5 for some reason +# if defined(__ICL) && __ICL < 600 + typedef boost::shared_ptr smart_pointer; +# else + typedef std::auto_ptr smart_pointer; +# endif + + return new objects::pointer_holder( + smart_pointer(p)); } };