Subject: Re: [boost] [boost-lists][string algo] C++0x string algo.
From: Pavol Droba (droba_at_[hidden])
Date: 2010-01-19 17:31:42
On 18. 1. 2010 13:58, Mathias Gaunard wrote:
> Rob Riggs wrote:
>> On 01/17/2010 05:10 PM, Mathias Gaunard wrote:
>>> Germï¿½n Diago wrote:
>>>> auto r = split(str, predseparators);
>>>> vector<string> vec(r.begin(), r.end());
>>> Which is the mechanism I offered, i.e. lazy evaluation with range
>> I would love to see this added.
> I think getting it added is another problem. This is more a rewrite of
> StringAlgo than a simple extension.
> I might be better to try out the system as StringAlgo2 first.
I'd like to add few points here (as an author) if I might :).
First of all, I'm all for any improvements that may come from C++0x,
but I would realy like to keep the library working with the (not so) old compilers.
So the new functionality should be kept separate.
Now to the actual improvements.
*auto* and return values might really come handy, but there are not so many places
where they can really be used. Apart from split I don't see much improvement they could bring.
Lazy evaluation is already part of the library's philosophy, so it might just require
soma adapters here and there. Internaly the split is handled by find iterators, and it
is possible to define the result as a pair of those. Just check the implementation of
boost::algorithm::iter_split. *auto* might come realy handy here though.
If some sort of lazy evaluation framework can use this, it might only be beneficial.
But I'm not sure if it is not a little bit out of scope of this library.
Anyway these are just my quick thoughts, I didn't considered any change in these
directions yet. If somebody is willing to experiment, I can offer my assistance.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk