Is there a way in C++ to ensure that a virtual method in a subclass is in fact overriding a super class virtual method? Sometimes when I refactor, I forget a method and then wonder why it is not being called but I forgot to change the method signature so it is no longer overriding anything.
Thanks
It is possible in C++11, with the
overrideidentifier:This allows you to find out at compile time whether you are failing to override a method. Here, we neglect to make the method
const: