Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntactic clarification of 12-8-1 wording
#1
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.
?
Reply
#2
The first alternative is intended
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)