Re: #pragma vtordisp in VC++

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ralph (news.20.nt_consulting32_at_spamgourmet.com)
Date: 12/09/04


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.



Relevant Pages

  • Re: About Thread Completion Notify.
    ... This is the reason that i must keep track of the threads and they have to ... i remove it from the array. ... > (which you probably don't since you are servicing requests in separate ... you shouldn't have a need for waiting on events. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Non-intel benchmarks on Conroe vs AMDs AM2 FX62
    ... Are you advocating waiting, for some future "shake-out" or price ... new and promising CPU? ... much better reason to wait than are future price reductions. ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: Rates
    ... before action and waiting a reasonable time is ... in the hope that you'll get paid before the other guy. ... and again this is not t he reason most invoices are late. ... interest lost by waiting. ...
    (uk.consultants)
  • Re: Help for Israel
    ... any reason why Jews had, or have, any legitimate claim to Palestine'. ... debate before you presume to be able to discuss with the adults'. ... of Jewish life in the country...' ... And I'm still waiting for a sensible answer to the above, ...
    (uk.politics.misc)
  • Re: Help for Israel
    ... any reason why Jews had, or have, any legitimate claim to Palestine'. ... of Jewish life in the country...' ... And I'm still waiting for a sensible answer to the above, ...
    (uk.politics.misc)