What happens if, in a large chain of inheritances, the virtual
keyword is at some point forgotten?
For example:
struct I {};
struct A : virtual I {};
struct B : A, virtual I {};
struct C : B, /* virtual */ I {}; // ooops, distraction error
Is it like in the methods case, that once a method is virtual it stays virtual forever, or is the struct C
reintroducing the diamond problem?
Is there a way to make the compiler check for this type of errors, in a similar way the new override
keyword is checking for the correct overriding of the virtual methods?