From: David Abrahams (dave_at_[hidden])
Date: 2003-04-18 10:19:59
Vladimir Prus <ghost_at_[hidden]> writes:
> David Abrahams wrote:
> > > I can't find the description of methods for "Derived" class of
> > > iterator_facade, for example.
> > Um, that's private, so it won't be documented (thanks Thomas!)
> Eh.. later you say
> You need to implement at least advance, increment, equal, and
> but aren't those defined in "Derived"? And there's not list of methods I
> should implement.
I'm sorry, I thought you were asking about the "derived()" method.
Yes, of course you're right that the requirements for the Derived
class must be documented.
> > > 2. What is the relation with "new iterator categories". Am I
> > > supposed to pass old categories as template parameters to
> > > facade/adapter.
> > New or old; either one should work.
> > > 3. The attached code does not compile with gcc 3.2, saying that:
> > >
> > > /usr/include/c++/3.2/bits/stl_iterator_base_types.h:123: no type named
> > > ` iterator_category' in `class my_old_iterator'
> > >
> > > The message is correct, but... I've explicitly specified iterator
> > > category when declaring iterator adaptor. Am I doing something wrong?
> > Yes, lots!
> > You need to implement at least advance, increment, equal, and
> > dereference in your derived iterator class in order to make a forward
> > iterator.
> I understand. I planed to implement them later (they are not needed until
> used, right?)
I'm not sure. We may have put in some concept checking which enforces
their existence for the appropriate categories.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk