mirror of
https://github.com/boostorg/python.git
synced 2026-02-02 09:02:15 +00:00
better auto_ptr support
[SVN r17592]
This commit is contained in:
@@ -66,10 +66,17 @@ BOOST_PYTHON_MODULE(auto_ptr_ext)
|
||||
.def("value", &X::value)
|
||||
;
|
||||
|
||||
class_<Y, std::auto_ptr<Y>, bases<X>, boost::noncopyable>("X", init<int>())
|
||||
class_<Y, std::auto_ptr<Y>, bases<X>, boost::noncopyable>("Y", init<int>())
|
||||
;
|
||||
|
||||
// VC6 auto_ptrs do not have converting constructors
|
||||
#if defined(BOOST_MSVC_STD_ITERATOR)
|
||||
scope().attr("broken_auto_ptr") = 1;
|
||||
#else
|
||||
scope().attr("broken_auto_ptr") = 0;
|
||||
implicitly_convertible<std::auto_ptr<Y>, std::auto_ptr<X> >();
|
||||
#endif
|
||||
|
||||
def("look", look);
|
||||
def("steal", steal);
|
||||
def("maybe_steal", maybe_steal);
|
||||
|
||||
Reference in New Issue
Block a user