|
Boost : |
Subject: Re: [boost] AlRangeExandrescu?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-07-25 03:39:38
David Abrahams skrev:
> on Fri Jul 24 2009, Thorsten Ottosen <thorsten.ottosen-AT-dezide.com> wrote:
>
>> David Abrahams skrev:
>>
>>> Regardless, there could still be a single correct answer from the
>>> standpoint of aesthetics, purity, and orthogonality. If
>>>
>>> drop_front(find(range, x))
>>>
>>> does the same thing as
>>>
>>> find[_f+1,_e]( range, x )
>>>
>>> then you don't need the complicated meta-goop in there.
So how do we evaluate that aesthetics, purity and orthogonality
of the two different approaches? The find interface is one interface
with goop, and the other alternative is now at least 5 different
functions: find, until, before, drop_front, drop_back.
>> Then how would you safely implement
>>
>> find[_f-1,_e]( range, x );
>
> At first glance, you can't. Is there a known use case for that? If not, it's moot.
Who knows. Maybe you want the element before the found one to be there
for some reason.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk