Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clarification Rule 0.2.1
#2
You're right, the intent of 0.2.1 was that 'd' in you example should be compliant, but a strict reading of the rule says its not.

The problem is the last paragraph in the rule:  "The variable is of class type and has a user-provided constructor or a user-provided destructor.".  The two occurrences of  'user-provided'  should be  'non-trivial'.  This has been noted for future revision.

In the short term, you can either deviate or provide an explicit constructor for Devired.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
Clarification Rule 0.2.1 - by hahn - 27-08-2026, 11:32 AM
RE: Clarification Rule 0.2.1 - by misra cpp - 28-08-2026, 12:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)