That's not what the range-based loop is for. Don't use it; use a normal for
loop instead. The range-based version is only if you want to do something with every element in the container, without mutating the container.
for (auto it = ss.begin(); it != ss.end(); )
{
if (*it < v) { ss.erase(it++); }
else { ++it; }
}
Even simpler:
ss.erase(ss.begin(), ss.lower_bound(v));