From: Igor Tandetnik on
Mihajlo Cvetanović <mcvetanovic(a)gmail.com> wrote:
> Update on the subject. I was playing with inheritance keywords
> __single_inheritance, __multiple_inheritance, __virtual_inheritance.
> If you specify the correct keyword everything works. If you specify
> incorrect inheritance the compiler reports C2292. Very nice. BUT if
> you specify virtual inheritance for non-virtual inheriting class then
> compiler also hits internal error. Not nice. Someone should report
> this :-)
>
> So, the compiler has a way to detect inconsistencies in handling the
> pointers to members between compilation units.

Are you sure it was between translation units? I would be very surprised if the compiler were able to do that. I'm pretty sure the compiler actually saw a forward declaration with an incorrect keyword (perhaps in an #included header), and then a mismatched definition, in the same translation unit.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925