You may use the *foreach* syntax: `for (auto violation : violations)`.