AutosarC++18_10-M6.4.7

The condition of a switch statement shall not have bool type

Required inputs: IR

Rationale

An if statement gives a clearer representation for a Boolean choice.

Example
switch ( x == 0 )   // Non-compliant 
{
...
}

Note

For legal reasons, this rule’s description is not part of the public documentation.