Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2001-12-14 15:44:45


Hi,

I have problem using iterator_adaptor in following case:

#include <boost/iterator_adaptors.hpp>

#include <list>

class A {
public:
    virtual void foo() = 0;
};

int main()
{
    std::list<A*> lst;

    // ... populate lst

    typedef
boost::indirect_iterator_generator<std::list<A*>::iterator,A>
generator;

    generator::type it = lst.begin();

    it->foo();

    return 0;
}

I can't compile this example.

Is there workaround or different way to to the same thing?

Thank you,

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk