Use range-based for #46