Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-14 20:19:19


Ah, yes.

Please see:

http://www.boost.org/libs/utility/iterator_adaptors.htm#4

  and

http://www.boost.org/libs/utility/iterator_adaptors.htm#5

Those should clear up your questions.

You may also want to read the paper at:

http://www.boost.org/libs/utility/iterator_adaptors.pdf

Let me know if you still don't understand something,
Dave

----- Original Message -----
From: "rogeeff" <rogeeff_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, December 14, 2001 7:26 PM
Subject: [boost] Re: iterator adaptor and pure virutal classes

> --- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> >
> > ----- Original Message -----
> > From: "rogeeff" <rogeeff_at_m...>
> >
> > >
> > > int main()
> > > {
> > > std::list<A*> lst;
> > >
> > > // ... populate lst
> > >
> > > typedef
> > > boost::indirect_iterator_generator<std::list<A*>::iterator,A>
> > > generator;
> > >
> > > generator::type it = lst.begin();
> >
> > generator::type it(lst.begin());
> >
> > >
> > > it->foo();
> > >
> > > return 0;
> > > }
> > >
> > > I can't compile this example.
> >
> > Next time, please give the reader some clue by posting at least one
> of the
> > error messages ;-)
> >
> > -Dave
>
> I thought you would deduce from the example.
>
> Here first error that gives me MSVC:
> ... \boost_1_25_0\boost\type_traits\conversion_traits.hpp(61) : error
> C2259: 'A' : cannot instantiate abstract class due to following
> members:
>
> I played with it a bit. But I still can't overcome compiler attempts
> to instantiate class A. For example, iterator_adaptor::operator[]
> need value_type to be non-abstract.
>
> Gennadiy.
>
>
>
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


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