Ashkan Aliabadi
Following node_iter example of iterator_facade (here), how can I wrap that
inside an any_iterator? I'm really having a hard time figuring that out. I'm
using an any_iterator implementation by Thomas Becker (here). I would really
appreciate it if anyone could give me a hand.Regards
You should use iterator_facade to create new types of iterators (for example, if
you have your own data structure and want to provide iterator based access to
its elements). This is one part of the story. Another part is any_iterator. It's
just an iterator that any other iterator can be convertible to. You don't need
to add support for any_iterator in your own iterator (that you probably create
using iterator_facade); any_iterator will just work with any iterator type (even
ones from STL).
Here is an example of how you can use any_iterator.
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include