Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A7-2-1 Still relevant in C++14?
#1
Rule A7-2-1 seems copied verbatim from the MISRA C++ 2008 rules. However, there's a key difference: C++14 has scoped enums. There, it is not unspecified (nor undefined) to cast an integer to the enum type when it is not any of the enumerators, since the valid range for the enum is the range of the underlying type. 

Based on that, what would be the rationale for keeping A7-2-1 in the AUTOSAR C++14 rules?
Reply


Messages In This Thread
A7-2-1 Still relevant in C++14? - by cgpzs - 29-01-2025, 10:03 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)