Adam Turoff wrote:

> And what's the linguistic hook that allows C++ object-based inheritance?
> And where's the guarantee that vtbls are per-object and not per-class?
> 
> Z.

You're right, it might be a side effect of a particular implementation of
virtual methods.  But AIUI that implementation is universal.



.....

g++ 2.95.2 apparently won't let me do it,



         &d.virtmeth = 

gives me a compiler error

vdem.cpp:43: taking the address of a bound member function
vdem.cpp:43:   to form a pointer to member function, say `&demo::virtmeth'

which seems to imply that g++ is using a per-class virt table, so
I'm wrong.

-- 
                                           David Nicol 816.235.1187
                   "Perl was born in downtown Hell!" -- Matt Youell

Reply via email to