[C++-sig] Inheritance with B/P
David Abrahams
dave at boost-consulting.com
Fri Feb 7 23:37:29 CET 2003
Bruce Lowery <bruce_lowery at yahoo.com> writes:
> --- David Abrahams <dave at boost-consulting.com> wrote:
>> Bruce Lowery <bruce_lowery at yahoo.com> writes:
>>
<snip>
>> > class_< Base, auto_ptr<Base> >(...) ...;
>> > class_< Derived, auto_ptr<Derived>, bases<Base> >(...) ...;
>> >
>> > Any ideas?
>>
>> This looks small enough that you could post a complete reproducible
>> test case, no?
>>
>
> The classes above are a vast simplification of my actual code -
> which I can't post. Obviously, it may be that there is some other
> mistake not exhibited in the simple example above that is causing
> the error.
It's not obvious to me. I didn't test your simple case because what
you posted is incomplete. Have you now verified that it doesn't work?
> I had hoped someone would point out a false assumption or flawed
> thinking (I'm still not a python 'expert') in the above. If not,
> then I have to look for the 'other mistake' that causes python to
> miss the inheritance relationship between 'Derived' and 'Base' in
> the 'SomeOther.someFunc()' method call.
As I said, the example is incomplete, so it's hard to tell what
assumptions you may be making.
> I suppose I should have first actually tested the problem on the
> simplified case above before posting
You can learn a lot that way ;o)
> - was hoping, though, for a quick correction from the more
> python-experienced...
And the more-experience were hoping to get an accurate picture of what
you're doing ;-)
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list