set::erase

iterator erase(iterator it);
iterator erase(iterator first, iterator last);
size_type erase(const Key& key);

The first member function removes the element of the controlled sequence pointed to by it. The second member function removes the elements in the range [first, last). Both return an iterator that designates the first element remaining beyond any elements removed, or end() if no such element exists.

The third member removes the elements with sort keys in the range [lower_bound(key), upper_bound(key)). It returns the number of elements it removes.