The following code does not work correctly. How should it be done correctly?
for (std::set<Color>::iterator i = myColorContainer.begin();
i!=myColorContainer.end();
++i)
{
if ( *i == Yellow)
{
DoSomeProccessing( *i );
myColorContainer.erase(i);
}
}