Boost logo

Boost :

Subject: Re: [boost] for_each abstraction
From: Karsten Ahnert (karsten.ahnert_at_[hidden])
Date: 2010-11-17 16:35:42


On 11/17/2010 10:24 PM, joel falcou wrote:
> On 17/11/10 22:18, Jeffrey Lee Hellrung, Jr. wrote:
>> Are you objecting to the syntax or to the entire idea of letting
>> sequences opt in for tighter control of their iteration?
>>
>> I'm not 100% convinced it's a good idea, but I'm not convinced it's a
>> bad idea either. It appears (to me, at least) to be one solution to
>> the OP's question, and to Mathias/Joel's problem with "packing" range
>> elements together to vectorize operations.
>>
>> It also could (speculation) make iterating over a type-erased range
>> more efficient, compared to using type-erased iterators.
>
> Binding algorithm to container type lessen genericity of code.

Sure, but there is no to change the way how elements in a range are
iterated. In my example, the algorithm is entirely provided by for_each
with the appropriate operation.


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