
Does such a thing exist? So you could the following (with some_iterator begin the 'thing'): template <typename Value> class some_iterator { ...magic... }; void f(some_iterator<int> begin, some_iterator<int> end) { ...do something cool with begin and end... } int double_int(int i) { return i * 2; } int main() { std::vector<int> vec_int; ...fill vec_int... f( make_some_iterator(vec_int.begin()), make_some_iterator(vec_int.end())); f( make_some_iterator( make_transform_iterator(vec_int.begin(), double_int)), make_some_iterator( make_transform_iterator(vec_int.end(), double_int))); std::deque<int> deq_int; ...fill deq_int... f( make_some_iterator(deq_int.begin()), make_some_iterator(deq_int.end())); }

Mike Gibson
Does such a thing exist? So you could the following (with some_iterator begin the 'thing'):
http://opensource.adobe.com/classadobe_1_1any__iterator.html might be helpful to you. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Mike Gibson