TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JERRY COFFIN
from: RON BASS
date: 1997-04-08 23:41:00
subject: Re: Multithreading member-functions

Hello Jerry!
You wrote to Darin McBride...
 DM> I thought that RTTI _could_ do this for pointers to void.
 ...
 JC> Some looking in the standard shows that I was dead wrong.  You should be
 JC> able to use a dynamic_cast to do the job.  I'm still not sure how the
 JC> compiler can ensure that it'll work, but I guess that's its problem.
IIRC, the draft standard specifies that RTTI is only available for classes 
that have at least one virtual function.  If so, it's fairly clear that the 
compiler only has to go to the memory pointed to by the original void 
pointer, look at the "standard" offset in the (presumed) object for the 
vtable pointer, and then determine if the data at that offset is a pointer 
that points to a true vtable.
  ttfn
     -Ron  (rbass@intersecttech.com)
--- EZPoint V2.2
---------------
* Origin: There's a point here, somewhere... (1:128/13.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.