Miscellaneous-NoCPPStructs

Do not use structs in C++, rather use classes

Required inputs: IR

In C++, classes and structs are equivalent except for the default visibility of members (public in struct, private in class).

Possible Messages

Key

Text

Severity

Disabled

cpp_struct

Use of struct in C++ unit.

None

False

Options

allow_deleted_default_constructor_for_pod

allow_deleted_default_constructor_for_pod : bool = False

Whether a POD type is allowed to have a deleted default constructor. In this case the original C++14 definition of a POD is used, even if the compiler implements CWG1496 as a bug-fix.
 

require_class_for_pod

require_class_for_pod : bool = True

Whether POD types should be classes as well.