[C++-sig] custom smart pointer, vector_indexing_suite typeerror
skottmckay at gmail.com
Thu Jun 2 18:37:22 CEST 2005
> You should use the new-style polymorphism support
> (http://www.boost.org/libs/python/doc/v2/wrapper.html) although this
> probably has nothing to do with your problem.
I'll check it out. Thanks
> The problem is that you're missing an __init__ function in testX.
> Calling the __init__ function of the base class inside it
> (i.e. X.__init__(self)) is what causes the held smart_ptr<X> to be
Ahh. Didn't realize the __init__ was required to trigger that. I did
have it 'working' without the init after I added an
implicitly_convertible< < smart_ptr<X_Wrapper>, smart_ptr<X> >(). It
would append but I hadn't verified that all the reference counting was
working as expected.
I will add the __init__ as well.
Many thanks for your help.
More information about the Cplusplus-sig