
19 Feb
2006
19 Feb
'06
5:09 a.m.
David Abrahams writes:
Thorsten Ottosen <tottosen@dezide.com> 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