Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A4-5-1 with ternary conditional operator
#2
You are right, your example does violate A5-4-1, and this is probably an oversight in the drafting.

As far as A5-16-1 is concerned, the last line of foo() is virtually the same as a compliant example, so Autosar was probably intending to include the ternary operator.

This is being reviewed for the next version of the rules.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: A4-5-1 with ternary conditional operator - by misra cpp - 13-05-2022, 02:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)