| High Integrity CPP Rule 5.1 | Follow each flow control primitive ('if', 'else', 'while', 'for', 'do' and 'switch') by a block enclosed by braces, even if the block is empty or contains only one line. |
| (QA C++ 4013, 4014, 4016, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4068) |
| Justification |
The consistent application of braces to delimit a block makes the code clearer, more consistent, and less error prone. |
| See also |
Rule 5.11 |
| Reference |
Industrial Strength C++ 4.3; |