Clarification for rule 11-0-1

Moderators: david ward, misra cpp

Post Reply
dg1980
Posts: 117
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Clarification for rule 11-0-1

Post by dg1980 » Thu Dec 01, 2016 1:40 pm

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.

misra cpp
Posts: 161
Joined: Mon Jun 02, 2008 1:55 pm
Company: MISRA

Re: Clarification for rule 11-0-1

Post by misra cpp » Tue Jan 24, 2017 9:59 am

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
Posted by and on behalf of
the MISRA C++ Working Group

Post Reply

Return to “6.11 Member access control (C++)”