STL iterators and templates
It's possible to do that without copy containers' data?:

    template<typename T> //we know only the type return by iterator
    class Foo {
    private:
        I iter; //or some base class of iterator or own generic iterator
        I iter2;
    public:
        template<typename I>
        Foo(begin, end) {
            iter = begin;
            iter = end;
        }
    };
    //...
    //this can't be changed
    std::vector<int> vec;
    Foo<int> foo1(vec.begin(), vec.end());
    std::list<double> list;
    Foo<double> foo2(list.begin(), list.end());
STL iterators and templates
===

It's possible to do that without copy containers' data?:

    template<typename T> //we know only the type return by iterator
    class Foo {
    private:
        I iter; //or some base class of iterator or own generic iterator
        I iter2;
    public:
        template<typename I>
        Foo(begin, end) {
            iter = begin;
            iter = end;
        }
    };
    //...
    //this can't be changed
    std::vector<int> vec;
    Foo<int> foo1(vec.begin(), vec.end());
    std::list<double> list;
    Foo<double> foo2(list.begin(), list.end());