develooper Front page | perl.perl6.language | Postings from July 2001

Re: Per-object inheritance in core a red herring?

Thread Previous | Thread Next
From:
David L. Nicol
Date:
July 10, 2001 14:29
Subject:
Re: Per-object inheritance in core a red herring?
Message ID:
3B4B7225.BC022E2B@kasey.umkc.edu
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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About