[C++-sig] Re: shared_ptr and inheritance
David Abrahams
dave at boost-consulting.com
Sat Jun 21 01:14:08 CEST 2003
"Brett Calcott" <brett.calcott at paradise.net.nz> writes:
>>
>> > I'm trying to pass a shared_ptr of a derived class into a method that is
>> > expecting a shared_ptr of the base class, and am getting type errors in
>> > python.
>>
>> Are you using the latest CVS state?
>>
>
> Should this magically work now? I thought you had to use :
>
> implicitly_convertible<DerivedPtr, BasePtr>();
>
> in your module def.
Works for me; I just checked in some tests which prove it.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list