[vtk-developers] VTK Coding Standards, C++11 override and =delete

Brad King brad.king at kitware.com
Thu May 5 16:47:33 EDT 2016


On 05/05/2016 04:41 PM, Robert Michael O'Bara wrote:
> Actually, doesn't override require the member function to be
> originally declared virtual?
> 
> You can't have function declared both can you?

The proposal is:

* Use "virtual" on the original base class declaration of the method.

* Do not use "virtual" in any derived class declaration of the method.

* Use "override" on all derived classes.  Leave this off in C++03
  by doing it through a macro.

This will work in C++03, C++11, etc.

-Brad



More information about the vtk-developers mailing list