[C++-sig] Re: Inheritance with B/P
Mike Rovner
mike at bindkey.com
Fri Feb 7 19:25:25 CET 2003
"Bruce Lowery" <bruce_lowery at yahoo.com> wrote in message
> > >> d = mod.Derived()
> > >> s = mod.SomeOther()
> > >> s.someOther( d )
> > > TypeError: bad argument type for built-in operation
> > >>
> > >
> > > In reality, the wrappers "hold" Base and Derived using auto_ptr:
> > >
> > > class_< Base, auto_ptr<Base> >(...) ...;
> > > class_< Derived, auto_ptr<Derived>, bases<Base> >(...) ...;
> > >
> > > Any ideas?
For me it's look like a C++ problem not a Python problem.
auto_ptr<Derived> is not inherited from auto_ptr<Base> and/or
there is no automatic conversion from former to later.
Just my .02
Mike
More information about the Cplusplus-sig
mailing list