Iterator with index uses reference wrapper