Boost logo

Boost :

Subject: Re: [boost] for_each abstraction
From: Eric Niebler (eric_at_[hidden])
Date: 2010-11-17 16:50:12


On 11/17/2010 4:24 PM, joel falcou wrote:
> Binding algorithm to container type lessen genericity of code.

... but is sometimes done in practice when the generic framework doesn't
provide the concepts for optimal implementations; e.g.
std::map::lower_bound. In the STL, that would be the case with for_each
over segmented sequences. A better solution, however, would be to define
a concept for segmented iterators and write a generic segmented for_each
algorithm.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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