From aa645b0372940e9986e1ab8dc70bd0329d9ea35d Mon Sep 17 00:00:00 2001 From: hsutter Date: Mon, 18 Jun 2018 11:25:16 -0700 Subject: [PATCH] Closes #1214 Added virtual dtor to make the example standalone --- CppCoreGuidelines.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index ec8a0c2..c312b5e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2116,11 +2116,13 @@ This will force every derived class to compute a center -- even if that's non-tr class Shape { // better: Shape is a pure interface public: - virtual Point center() const = 0; // pure virtual function + virtual Point center() const = 0; // pure virtual functions virtual void draw() const = 0; virtual void rotate(int) = 0; // ... // ... no data members ... + // ... + virtual ~Shape() = 0; }; ##### Enforcement