Part of our system uses memory shared between processes who do not share a common ancestor. We place C++ objects in this shared memory. Methods on these objects are either inline in the headers or out of line in object libraries that get linked into the respective processes.
An error frequently made by new comers to the system is to introduce a virtual method somewhere. This is guaranteed to crash the system as there is no way to ensure that the VT (virtual table) resides at the same address in each process.
Thus I wonder whether there is a way for me to cause the compiler to issue an error if someone attempts to introduce a virtual method. Something similar to making the copy and assignment constructors private to disallow copy semantics.