From 918a5695c7c18c7c96a77b1e36fa2789470a813d Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 1 May 2017 10:45:36 -0700 Subject: [PATCH] Address C.128: say 'avoid'. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e0fdf3d..4c49955 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -6463,7 +6463,7 @@ Readability. Detection of mistakes. Writing explicit `virtual`, `override`, or `final` is self-documenting and enables the compiler to catch mismatch of types and/or names between base and derived classes. However, writing more than one of these three is both redundant and a potential source of errors. -Use `virtual` only when declaring a new virtual function. Use `override` only when declaring an overrider. Use `final` only when declaring a final overrider. If a base class destructor is declared `virtual`, derived class destructors should neither be declared `virtual` nor `override`. +Use `virtual` only when declaring a new virtual function. Use `override` only when declaring an overrider. Use `final` only when declaring a final overrider. If a base class destructor is declared `virtual`, one should avoid declaring derived class destructors `virtual` or `override`. Some code base and tools might insist on `override` for destructors, but that is not the recommendation of these guidelines. ##### Example, bad