Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2006-02-19 00:09:09


David Abrahams writes:
> Thorsten Ottosen <tottosen_at_[hidden]> writes:
>
>>>>>If this is an important case (still not convinced),
>>>>
>>>>generally it is hard to say what is important to all people. I do think,
>>>>however, that splitting a range into different sub-ranges is a fairly
>>>>common activity. Some ranges are more common:
>>>>
>>>>[begin,found)
>>>>[found,end)
>>>
>>>
>>> For that drop_front works great.
>>
>> how do you construct the range [begin,found) if the algorithm
>> returns ther range [found,end) ?
>
> Maybe you just write an algorithm for that?

FWIW, that's what we did here at Meta; our "plain" sequence version of
'find' returns an iterator (like 'std::find'), while 'find_head' and
'find_tail' return the corresponding ranges.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

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