Boost logo

Boost Users :

From: keithmac66 (keithmac66_at_[hidden])
Date: 2002-06-03 05:38:57


I'm struggling to understand how to use Iterator Adaptors, due to a
lack of simple examples. This is disappointing, given that
supposedly "Using iterator_adaptor, you can easily implement an
iterator class" (
Can anyone help, by explaining how to implement a random access
iterator for a custom collection class? e.g.:

    template <class T> class DumbCollection
        DumbCollection(T data[10])
            { for (int i = 0; i < 10; i++) m_data[i] = data[i]; }
        iterator begin();
        iterator end();
        T m_data[10];

Thanks, Keith

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at