This is a finicky complaint, but it's simplest to just use the stl iterators in this form of loop.

for (vector<int>::iterator peer = allpeers.begin(); peer != all_peers.end(); ++peer)