Typically you will find STL code like this:
for (SomeClass::SomeContainer::iterator Iter = m_SomeMemberContainerVar.begin(); Iter != m_SomeMemberContainerVar.end
It may make for disjointed code, but I also like to pull it out to a separate function, and pass both iterators to it.
doStuff(coll.begin(), coll.end())
and have..
template
void doStuff(InIt first, InIt last)
{
for (InIt curr = first; curr!= last; ++curr)
{
// Do stuff
}
}
Things to like:
Things to not like:
But one day, we'll have lambdas!