I'm iterating some items like this quite a lot in my code:
for (; i != end; ++i) {
if(!restricted(*i))
{
doSomethingWithI(*i)
}
}
Is there a nicer way of doing this, perhaps with std or boost?
Another example:
for (; i != end; ++i) {
if(!restricted(*i))
{
Path p = _pathFactory->build(*i);
Value v = _db->load(p);
std::string output = _styler->style(v);
_output->write(output);
}
}