AutosarC++18_10-A12.1.5

Common class initialization for non-constant members shall be done by a delegating constructor

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

delegating_constructor

Use delegating constructor for common initialization.

None

False

Options

allow_copy_move_constructor

allow_copy_move_constructor : bool = False

Whether to allow direct field initialization without a delegating constructor call for copy and move constructors.
 

only_report_if_delegate_constructor_exists

only_report_if_delegate_constructor_exists : bool = False

Report violations only if a delegating constructor already exists for the field.
 

only_report_if_more_than_common_field

only_report_if_more_than_common_field : int = 1

Report violations only if constructors initialize at least this many common fields.
 

only_report_if_more_than_constructors

only_report_if_more_than_constructors : int = 1

Report violations only if a field is initialized in more than the given number of constructors.