
18 Sep
2010
18 Sep
'10
2:37 p.m.
2010/9/17
It seems like there ought to be a natural way to do this using an iterator class.
I don't think that'll be a good solution to this problem, not efficient enough. Using this approach would introduce redundant overhead of checking equality of iterators.
Does such a thing exist in Boost, or is it planned in the near future?
No, as I know, there's no such thing in Boost. If you really want one, boost::iterator_facade can help you. For myself, I'd prefer making some generic algorithms like for_each_in_depth<n>(range, func) instead.