Re: [inti] entry fun
Bo Lorentsen <[email protected]> Mon, 05 Jan 2004 11:12:12 +0100
| Newsgroups | gmane.comp.gnome.inti |
|---|---|
| Organization | hjem |
| Message-ID | <[email protected]> |
Jeff Franks wrote: > As far as I'm aware, dynamic casting is always required when > upcasting/downcasting if multiple inheritance is used. Hmm, downcasting is the only case where the compiler don't have the propper type info. to ensure the validity of the cast, but I quess it will not do any harm, but runtime overhead :-) > This is because with multiple inheritance objects have several > addresses. Using a dynamic cast ensures that pointer returned actually > does point to the beginning of the multiplely inherited base object's > memory. Yeps, and in the case of upcasting, it will ensure it double, no harme done :-) /BL ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click