MISRA Discussion Forums

Full Version: Syntactic clarification of 12-8-1 wording
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Rule 12-8-1 states:
Quote:A copy constructor shall only initialize its base classes and the non-static members of the class of which it is a member.
Does this sentence mean:
Quote: A copy constructor may only initialize and, when doing so, may only initialize its base classes and the non-static members of the class of which it is a member.
or
Quote:A copy constructor may do things other than initialization but, if it does initialize, it may only initialize its base classes and the non-static members of the class of which it is a member.
?
The first alternative is intended