MISRA.MEMB.NOT_PRIVATEMember variable in non-POD class is not private. MISRA-C++ Rule 11-0-1 (required): Member data in non-POD class types shall be private.RationaleBy implementing class interfaces with member functions, the implementation retains more control over how the object state can be modified, and helps to allow a class to be maintained without affecting clients. Exampleclass C { public: int32_t b; // Non-compliant protected: int32_t c; // Non-compliant private: int32_t d; // Compliant }; |