Notice how B::Function( ) is empty but C::Function( ) is not. If I call B::Function( ), will the compiler realise that the function call is empty and optimise it away? Or will the compiler call it anyway?
If I call B::Function( ), will the compiler realise that the function call is empty and optimise it away?
If compiler would be able to perform devirtualization and prove that it is really B::Function( ) is being called, or you will just call B::Function( ) explicitely, then yes, I would expect it to optimise away call.