Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-02-14 11:17:16


"David Abrahams" <dave_at_[hidden]> wrote

| "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
|
| > "Eyal Farago" <eyal.farago_at_[hidden]> wrote in message
| > news:BC29F2A417B44F44BD3AA1AD9868CEDC034244_at_ilexchange.adrembi.com...
| > | you can easily achieve this using (make_)transform_iterator and boost
bind:

[snip]
| > well, I cannot use that when I want to write a manual loop.
| >
| > yes, it is simple, but also frequently used. And we also
| > have to think about less experienced users IMO.
|
| Both of you make good points. There's a third point I should bring
| up: Thorsten, your iterator isn't legal. Hint: what is the return
| type of its operator++?

yes, there are lots of trouple with it...for example, I don't think it
is good to base it on the container type when basing it on an iterator type
would be
more flexible.

| It has been pointed out that this sort of thing would be very much
| easier if, like iterator_facade and iterator_adaptor, all the
| specialized adapters could accept one more optional parameter that
| specifies the most-derived iterator class.

perhaps, but so much interested in the actual implementation...as a user
I just wished the functionality was there to use...just like I don't
have to code an indirect iterator, but can use boost::indirect_iterator.

If there is agreement that the two iterators would be a good idea, I
don't mind adding a proper implementation.

-Thorsten


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