quote:Original post by Eli Gottlieb
A standard implementation of vtables is neccessary because if there wasn't one how would objects from two different compilers call each other's virtual methods?
They can't. Try it. This is why inter-language or inter-compiler libraries expose their methods as extern "C", because C calling convention is standard at the byte level. The C++ name mangling alone will surely differ between compilers, not to mention vtable implementations.
Section 10.8c of the ARM (sorry, don't have the spec) offers two completely different ways to implement vtables. On top of that, they're just suggestions.
C++ is a behavioral specification, not an implementation specification. You cannot write an implementation spec without having to write one for every platform that chooses to adopt it. Cross-platform source is one of the founding tenets of C and C++. Depending on implementation details in your code is a sure-fire way to make it non-portable. Depending on implementation details to "make" programs across compilers or platforms portable is obviously a contradiction in terms.
COM does specify a binary-level protocol, so that's a solution if this is a problem.
{edit: A solution, not THE solution. Wow, the hubris of me..}
[edited by - Stoffel on June 6, 2002 4:28:21 PM]