MISRA Discussion Forums
Clarification for rule 11-0-1 - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19)
+---- Forum: 6.11 Member access control (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=140)
+---- Thread: Clarification for rule 11-0-1 (/showthread.php?tid=1295)



Clarification for rule 11-0-1 - dg1980 - 01-12-2016

Hi,

the rule text only mentions classes, not structs.
Now, in C++ struct and class are synonyms, except that by default everything is public in a struct.
So, does this rule implicitly apply to all structs as well?
Thank you.


Re: Clarification for rule 11-0-1 - misra cpp - 24-01-2017

The intent is that this rule applies to all classes and non-POD structs

The rule doesn't apply to POD structs.

A clarification of this will be considered for the next version