[C++-sig] Custom smart pointer with same behaviour as shared_ptr

john haddon theboyhaddon at hotmail.com
Sat Jan 19 22:36:45 CET 2008


>> Other point: please correct me if I am wrong.
>> I need to register every class I want to be able to cast to (i.e. every class I want to accept as 
>> argument).
>> So in that case I need to add both
>> 
>> INTRUSIVE_PTR_PATCH(B, B_class);
>> and
>> INTRUSIVE_PTR_PATCH(C, C_class);
>> 
>> so that my functions can take intrusive_ptr of type B and C.
>> No need to do it with A.

Taking a look at our bindings again, I think it would be wise to do the same for A too. Sorry if
I'm a little vague on this subject - it was a while ago and I didn't actually write all the code...
_________________________________________________________________




More information about the Cplusplus-sig mailing list