Boost logo

Boost :

From: the_dilster (dylan_at_[hidden])
Date: 2001-12-09 16:57:31


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
>
> ----- Original Message -----
> From: "the_dilster" <dylan_at_m...>
> >
> > The generators don't help avoiding pointer_iterator - as I said
it's
> > only needed if you want to use my member_iterator with a vector
under
> > VC, because iterator_traits isn't specialised properly.
> >
> > member_iterator should really be:
> >
> > template <class T, class I, class C =
iterator_traits<I>::value_type>
> > struct member_iterator : I
> -------------------------^^^
> Somehow I don't think that will work if I is a pointer.
>
> Oh, also, the return type of many of your operations is wrong. For
example,
> what is *++p, where p is a member iterator? Since you're getting
all of
> those operations from I, the base class, they will return an I and
not a
> member_iterator.

Ok fair enough, I only used inheritance as a time-saver anyway, I
suspected it wasn't really an adequate solution.

Dylan


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