|
Boost Users : |
From: Pavol Droba (droba_at_[hidden])
Date: 2005-12-02 03:05:58
On Fri, Dec 02, 2005 at 07:47:16AM +0000, Martin wrote:
> Pavol Droba <droba <at> topmail.sk> writes:
>
> >
> > Hi,
> >
> > This seems like a goot idea. I like the interface with int parameter.
> > I'll add it to my todo list.
> >
> > Thanks,
> > Pavol
>
> What's wrong with erase_tail_copy?
Well, you got me. It's a shame, but I have forgotten, that there is already
function for this. My response was make without consideration of the existence
of erase_tail/head.
Given this, I see no futher reason to modify behaviour of find_head.
>
> Don't like the idea with negative numbers becuse I can't see how code can use
> the functionality. Either you want the to use the positive version or the
> negative version and then it can be different functions. Combining it into the
> same function doubles the size and might affect inlining, optimization etc.
>
Actualy the usage of negative numbers in indexation of string ranges is quite common
in scripting world. For example ruby and perl do have something like this.
> What about find_nth?
>
It would make sence to do the same here, but only if other algorithms like find_head
would be modified as well.
As I see that there is no reason for former, I will not modify the later.
Best regards,
Pavol
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net