Rule A12-1-1 (required, implementation, automated)
Constructors shall explicitly initialize all virtual base classes, all direct
non-virtual base classes and all non-static data members.
Description
A12-1-1 triggers on deleted constructors of an inherited class.
Example
class BaseClass {};
class InheritedClass final : public BaseClass {
public:
InheritedClass() = delete; // A12-1-1 warning
InheritedClass(const InheritedClass&) = delete; // A12-1-1 warning
InheritedClass(InheritedClass&&) = delete; // A12-1-1 warning
};
}
Affected rules
A12-1-1
:cpp/autosar/explicit-constructor-base-class-initialization
Description
A12-1-1
triggers on deleted constructors of an inherited class.Example