
On Sun, 2010-04-11 at 21:02 +0200, Pavol Droba wrote:
Hi,
On 11. 4. 2010 19:40, Mathias Gaunard wrote:
Gaydov Victor a écrit :
Hello. Could you answer these two questions:
1. Are there trim range algorithms that work with iterators, instead of strings? (I didn't find such). If not, why not to add them? Something like this: http://pastebin.org/146696
You found it yourself: boost::algorithm::detail::trim_end I suppose it could become first-class, but there are better solutions, like taking a range and returning a subrange.
Is it ok, generally, to expect the code using functions from detail:: to work with future versions of boost?
What's the error? I guess it doesn't work because it doesn't have a result_type typedef.
Yes.
You are trying to mix apples with oranges. classification predicates in StringAlgo library are not compatible with standard stl functors, because they have templated operator. This is very useful, since you don't have to provide explicit type when passing to an algorithm.
The library provides a set of basic combinators. You can simply write (!boost::is_space() || boost::is_digit). Just check the documentation.
Thank you. I understand now.
In addition you can use boost::lambda tools. All classification predicates are compatible with it.
Best Regards, Pavol.