mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
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<AbstractBase>::value to be evaluated to true
This commit is contained in:
@@ -4938,6 +4938,7 @@ defined as defaulted.
|
|||||||
|
|
||||||
class AbstractBase {
|
class AbstractBase {
|
||||||
public:
|
public:
|
||||||
|
virtual void foo() = 0; // at least one abstract method to make the class abstract
|
||||||
virtual ~AbstractBase() = default;
|
virtual ~AbstractBase() = default;
|
||||||
// ...
|
// ...
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user