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

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri May 6 11:42:29 EDT 2016


On Thu, May 5, 2016 at 4:47 PM, Brad King <brad.king at kitware.com> wrote:
> 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.
>
That is exactly what I was proposing - thanks Brad.

Marcus


More information about the vtk-developers mailing list