[C++-sig] Re: derived class without virtual method

David Abrahams dave at boost-consulting.com
Tue Aug 12 05:03:30 CEST 2003


Stefan Fleiter <sf.lists at web.de> writes:

> Hi,
>
> I am using boost::python 1.30 to wrap some C++-Library.
> In this library I have a class Cursor and a dreived class ExtCursor
> I use for wrapping to python.
>
> I always use ExtCursor, neither it nor its base class Cursor has any
> virtual method.
> When I wrap ExtCursor its member variable of type std::vector
> reports a size of one in the destructor, but there are no methods
> which could change its size yet.
>
> If I add *any* virtual method to the base class Cursor
> this effect does not show.
>
> Does boost::python use any rtti or such which depends on a vtable?

Definitely, it uses RTTI in many places, though I doubt that has any
relationship to your problem.

> Any other ideas?

I think your problem is described too vaguely for anyone to help you.
Code for small reproducible cases helps.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list