
Justin Gottschlich wrote:
After quickly looking through Kasper's design, I see the fundamental difference between my tree and Kasper's is that Kasper attempts to cover all possible tree iterations by definition of all possible types of iterators. My tree implements an iterator that functions as a tree and therefore naturally covers all possible types of iterations - given any node within the tree, you can iterate however you like (in, out, ++, --) from that node.
I haven't looked at the code, so please correct me if I am off base. But isn't having iterators which behave like stl iterators the only way to make the tree work with generic algorithms? I think that your multi-purpose iterator could be very convenient for the code that is hardwired to use trees, but I think that it would also be nice if the other iterators were provided, so that you could for_each over a single level in the tree, or over the whole tree, etc... -Jason