Skip to content

Commit 493ff9c

Browse files
committed
Intel 5 compatibility
[SVN r12963]
1 parent bbc49e1 commit 493ff9c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

include/boost/python/to_python_indirect.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
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

1516
namespace 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

0 commit comments

Comments
 (0)