Boost logo

Boost Users :

Subject: Re: [Boost-users] Any "2D" iterator?
From: TONGARI (tongari95_at_[hidden])
Date: 2010-09-18 10:37:40


2010/9/17 <lfrfly_at_[hidden]>

> 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.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net