Opened 8 years ago

Closed 8 years ago

#4751 closed Bugs (fixed)

Breaking change between 1.41 and 1.44in split

Reported by: henry_christophe@… Owned by: Pavol Droba
Milestone: Boost 1.45.0 Component: string_algo
Version: Boost 1.44.0 Severity: Showstopper
Keywords: Cc:


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" ),boost::algorithm::token_compress_off);

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.

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by Pavol Droba

Status: newassigned

comment:2 Changed 8 years ago by Vladimir Prus

Milestone: To Be DeterminedBoost-1.45.0
Severity: RegressionShowstopper

It's not apparent to me that new behaviour is wrong. Anyway, how about looking at SVN log to determine who changed that, and talk to that person?

I'm marking this Showstopper since Eric expressed a wish to have this resolved for 1.45.

comment:3 Changed 8 years ago by Pavol Droba

Actually, there was one change. A small fix, that should not have such an effect. But it might be possible that the fix uncovered another problem. Anyway I will fix the issue soon. Just give me a coupe of days.

comment:4 Changed 8 years ago by Pavol Droba

I have just commited the fix into the trunk. But I probably cannot merge to the release now. Sorry I was not able to fix it sooner.

comment:5 Changed 8 years ago by Pavol Droba

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Pavol Droba.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.