File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1010# include < boost/python/object/pointer_holder.hpp>
1111# include < boost/python/object/class_object.hpp>
1212# include < boost/python/detail/unwind_type.hpp>
13+ # include < boost/shared_ptr.hpp>
1314# include < memory>
1415
1516namespace boost { namespace python {
@@ -34,8 +35,15 @@ namespace detail
3435 template <class T >
3536 static result_type execute (T* p)
3637 {
37- return new objects::pointer_holder<std::auto_ptr<T>, T>(
38- std::auto_ptr<T>(p));
38+ // can't use auto_ptr with Intel 5 for some reason
39+ # if defined(__ICL) && __ICL < 600
40+ typedef boost::shared_ptr<T> smart_pointer;
41+ # else
42+ typedef std::auto_ptr<T> smart_pointer;
43+ # endif
44+
45+ return new objects::pointer_holder<smart_pointer, T>(
46+ smart_pointer (p));
3947 }
4048 };
4149
You can’t perform that action at this time.
0 commit comments