From 6a0b5e6ecac6afe21670ef4460efe019b60aa2a8 Mon Sep 17 00:00:00 2001 From: Henrique Mageste Date: Thu, 30 Mar 2023 23:17:31 +0200 Subject: [PATCH] Abstract class needs at least one abstract method to be considered abstract (#2053) The introduction of the method is needed, for instance, for constructions like std::is_abstract::value to be evaluated to true --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 46919a6..7332146 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -4938,6 +4938,7 @@ defined as defaulted. class AbstractBase { public: + virtual void foo() = 0; // at least one abstract method to make the class abstract virtual ~AbstractBase() = default; // ... };