![]() |
I’ve been trying to learn – really learn and understand, not just use ineffectively – the monster that is the Standard Template Library. The fact that the mud is written using STL classes doesn’t mean squat as far as my real understanding of the STL goes. Meyer’s latest book is helping a lot, and getting me past that “Ohhh, I get it” stage, but still, I have to wonder – is this:
for_each(fCharacterAffects.begin(), fCharacterAffects.end(), bind1st(mem_fun(&Character::removeAffect), target));
really so much better (readable? maintainable? understandable?) than the following?
for (vector<CharacterAffect*>::const_iterator i = fCharacterAffects.begin();
i != fCharacterAffects.end(); i++) {
target->removeAffect(*i);
}
