Re: #pragma vtordisp in VC++
From: Ralph (news.20.nt_consulting32_at_spamgourmet.com)
Date: 12/09/04
- Next message: Carl Daniel [VC++ MVP]: "Re: Execute batch commands in a makefile"
- Previous message: Simon Trew: "Re: template method gof pattern"
- In reply to: R. Green: "#pragma vtordisp in VC++"
- Next in thread: R. Green: "Re: #pragma vtordisp in VC++"
- Reply: R. Green: "Re: #pragma vtordisp in VC++"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Dec 2004 08:59:29 -0600
I was waiting for some guru to reply, as I have occasionally been curious myself.
Here is an interesting little article that suggests some reason for the option.
http://www.codeproject.com/cpp/FastDelegate.asp
However, I have one serious warning ...
I was perfectly happy with my simple working point-of-view that classes compiled into nice little "vtables" and that all compilers worked pretty much the same. If you have the same general world-view and don't want to destroy that pleasant illustion - don't read the article. <g>
-ralph
"R. Green" <rgreen@inbox.ru> wrote in message news:%23qZbVaT3EHA.2676@TK2MSFTNGP12.phx.gbl...
Hi,
Could anybody explain in details about this pragma ? Or where can I read about it ?
MS documentation is very poor:
"If a derived class overrides a virtual function that it inherits from a virtual base class, and if a constructor or destructor for the derived class calls that function using a pointer to the virtual base class, the compiler may introduce additional hidden "vtordisp" fields into classes with virtual bases."
WHY does the compiler need that fields ?
Thanks.
- Next message: Carl Daniel [VC++ MVP]: "Re: Execute batch commands in a makefile"
- Previous message: Simon Trew: "Re: template method gof pattern"
- In reply to: R. Green: "#pragma vtordisp in VC++"
- Next in thread: R. Green: "Re: #pragma vtordisp in VC++"
- Reply: R. Green: "Re: #pragma vtordisp in VC++"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|