I have a bunch of classes, instances of which that need to live in shared
memory and be accessed by multiple processes. This means that they cannot
have a vtable as the addresses in it will be in the address space of the
process that originally created the shared memory and therefore unavailable
to the other processes that may wish to use these instances of the classes.
Every so often I forget this and introduce a virtual function causing a
period of brow-furrowing until I recall the prohibition.
What I want to know is, is there a (preferably compile-time) method of
determining if a given class has virtual functions, so I can catch this
before the brow-furrowing part.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]