
On Tue, Aug 03, 2004 at 09:21:57AM -0700, Jeff Garland wrote:
I've been writing some code with string algorithms and I noticed a couple documentation issues:
1) First example:
#include <boost/string_algo.hpp>
should be #include <boost/alogorithm/string.hpp>
2) In the 'split' section example:
typedef vector< string > split_vector_type;
split_vector_type SplitVec; // #2: Search for tokens split( SplitVec, str1, is_any_of<char>("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" }
This doesn't work for me on gcc3.3.2 Linux (passes all regression tests) and it conflicts with the documentation of is_any_of which takes a collection not a char string as the parameter.
Thanks for pointing that out. Explicit template parameter is an old reminiscent. It should no be there. So the correct syntax would be: typedef vector< string > split_vector_type; split_vector_type SplitVec; // #2: Search for tokens split( SplitVec, str1, is_any_of("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" } Regards, Pavol