It will cause crash on iOS simulator.
I think it can be written like this
```c++
void Set::removeAllObjects()
{
    SetIterator it = _set->begin();
    SetIterator tmp;

    while (it != _set->end())
    {
        if (!(*it))
        {
            break;
        }
        
        tmp = it;
        ++tmp;
        _set->erase(it);
        it = tmp;
    }
}
```