Feedback for composite_visitor

I am currently evaluating (not testing!) Dave Handley's composite_visitor from the sandbox. It seems to be quite useable so far, I like it. Some thoughts: Instead of providing different functions begin_shallow(), begin_deep() etc. and the corresponding iterator types, I'd provide an iterator template with a "traversal policy", like that: template <class TraversalPolicy> iterator<TraversalPolicy> begin(); The iterators should be implemented using Boost.Iterator, of course. At the moment I could think of these traversal policies: * shallow: like shallow_iterator * postorder: like deep_iterator * preorder: parent node first, then it's children, recursively * ancestor: start node, then it's parent, the parent's parent etc. Does that sound reasonable to you? Best regards, Klaus
participants (1)
-
Klaus Nowikow