|
Boost Users : |
From: Pavol Droba (droba_at_[hidden])
Date: 2005-11-15 02:11:58
Hi,
There was a serious discussion about the semantics of split()
function some time ago. According to this discussion, the behaviour
has been slightly changed.
The result can be described as follows:
split() now always returns n+1 segments where n is a number of
delimiters. Even if the segments are empty.
So that new behavious is slightly different, but it should be easy
to fix your code. If this is a problem for you, I suggest you
to try to replace boost/algorithm/string/find_iterator.hpp with the
one from the version 1.32. It should not break the other code.
Best Regards,
Pavol.
On Mon, Nov 14, 2005 at 03:16:17PM -0600, Dave Dribin wrote:
> Hello,
>
> I recently upgrade from Boost 1.32.0 to 1.33.0, since I just upgraded
> to Mac OS X 10.4 from 10.3. I noticed a slightly different behavior
> in boost::algorithm::split between these two versions. If you have a
> trailing delimiter, like:
>
> vector<string> results;
> ba::split(results, ",foo,", ba::is_any_of(","));
>
> This returns 2 elements in 1.32.0 and 3 elements in 1.33.0. Was this
> changed intentionally? It does seem to make more sense to return 3
> elements, but it currently breaks my program.
>
> -Dave
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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