Subject: Re: [boost] [String algo] Breaking change between 1.41 and 1.44 in split
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2010-10-18 15:12:32
2010/10/15 Pavol Droba <droba_at_[hidden]>:
> First of all, I would suggest you to post requests such as this to trac. I'm
> not able to
> follow the list regularly and a single mail is easy to miss.
> I'm not aware about any change that could cause such a result as you
> describe in between
> versions 1.41 and 1.44 so I really need to investigate it.
> I'll let you know later.
> Best Regards,
> On Thu, 14 Oct 2010 21:54:16 +0200, Christophe Henry
> <christophe.j.henry_at_[hidden]> wrote:
>> As I got no answer on the user list, I try again.
>> Is the library still maintained?
>> ---------- Forwarded message ----------
>> From: Christophe Henry <christophe.j.henry_at_[hidden]>
>> Date: 2010/10/13
>> Subject: [String algo] Breaking change between 1.41 and 1.44 in split
>> To: boost-users_at_[hidden]
>> I noticed a breaking change in the split function when the input
>> string is empty. Consider the following example:
>> #include <string>
>> #include <vector>
>> #include <iostream>
>> #include <boost/algorithm/string/split.hpp>
>> #include <boost/algorithm/string/classification.hpp>
>> int main()
>> std::vector<std::string> result;
>> std::string empty_string;
>> boost::algorithm::split( result,
>> empty_string,boost::algorithm::is_any_of( "\t"
>> std::cout << "result size: " << result.size() << std::endl;
>> return 0;
>> With boost 1.41 I get:
>> result_size: 1
>> With 1.44 I get:
>> result_size: 0
>> Meaning that splitting an empty string now has a new meaning. All I
>> found to this subject was that 1 seems to be the correct answer
>> Furthermore, there has been, according to the release notes, no change
>> to string algo since the 1.41.
>> This brings me to the question, before I start updating my code, is
>> this change a design decision or an accident?
>> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk