mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 04:44:34 +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 {
|
||||
public:
|
||||
virtual void foo() = 0; // at least one abstract method to make the class abstract
|
||||
virtual ~AbstractBase() = default;
|
||||
// ...
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user