From 6c47693b58307d1c08de028fa0bad0860a684f01 Mon Sep 17 00:00:00 2001 From: hsutter Date: Tue, 29 Dec 2015 10:28:57 -0800 Subject: [PATCH] Applied suggestion in PR #268. --- CppCoreGuidelines.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 4013abc..aa45f81 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5391,11 +5391,15 @@ not using this (over)general interface in favor of a particular interface found ##### Reason -A class is more stable (less brittle) if it does not contain data. Interfaces should normally be composed entirely of public pure virtual functions. +A class is more stable (less brittle) if it does not contain data. Interfaces should normally be composed entirely of public pure virtual functions and a default/empty virtual destructor. ##### Example - ??? + class my_interface { + public: + // ...only pure virtual functions here ... + virtual my_interface() {} // or =default + }; ##### Enforcement