Boost logo

Boost Users :

Subject: Re: [Boost-users] iterators must go
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2009-05-15 11:15:31


> Date: Wed, 13 May 2009 02:18:07 -0400
> From: Scott McMurray <me22.ca+boost_at_[hidden]>
> Subject: Re: [Boost-users] iterators must go
> To: boost-users_at_[hidden]
> Message-ID:
> <fa28b9250905122318s3460e1dam5d624160d95ced5_at_[hidden]>
> Content-Type: text/plain; charset=UTF-8
>
> On Sun, May 10, 2009 at 09:24, Neal Becker <ndbecker2_at_[hidden]>
wrote:
> > Interesting presentation:
> >
> > http://www.boostcon.com/site-
> > media/var/sphene/sphwiki/attachment/2009/05/08/iterators-must-go.pdf
> >
>
> Very persuasive, but it's careful to touch only the examples that look
> nice. Note, for example, that every range was a whole container.
>
> The three-iterators part was somewhat handwaved-over as well. Take
> this bit of current code, for example:
>
> auto i = find(c.begin(), c.end(), some_pred());
> rotate(c.begin(), i, c.end());
>
> How do you do that nicely with ranges, when he has find returning a
> range? (Since right now, it implicitly actually returns 2 ranges.)
>
> And how does insertion work? Do we still need to keep the iterators
> around for insertion position?
>
> I'd love to see the finicky bits worked out, though, since I do like
> the idea.
>
> ~ Scott

Any place you really want a single iterator, a range of one value would
work. For appending or streaming out, you really want the concept of an
open-ended range.

--John

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net