From e44a9fcbd40923e9d5d342e444cf8a811e4a3eae Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 30 Sep 2021 11:24:47 -0700 Subject: [PATCH] Add enforcement for C.35, closes #1831 --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 844648e..bfb3668 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5127,6 +5127,7 @@ We can imagine one case where you could want a protected virtual destructor: Whe ##### Enforcement * A class with any virtual functions should have a destructor that is either public and virtual or else protected and non-virtual. +* If a class inherits publicly from a base class, the base class should have a destructor that is either public and virtual or else protected and non-virtual. ### C.36: A destructor must not fail