const correctness issues while passing an iterator to Primitive type