mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +03:00
Add enforcement for C.35, closes #1831
This commit is contained in:
@@ -5127,6 +5127,7 @@ We can imagine one case where you could want a protected virtual destructor: Whe
|
|||||||
##### Enforcement
|
##### Enforcement
|
||||||
|
|
||||||
* A class with any virtual functions should have a destructor that is either public and virtual or else protected and non-virtual.
|
* 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.
|
||||||
|
|
||||||
### <a name="Rc-dtor-fail"></a>C.36: A destructor must not fail
|
### <a name="Rc-dtor-fail"></a>C.36: A destructor must not fail
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user