Subject: [Boost-bugs] [Boost C++ Libraries] #4751: Breaking change between 1.41 and 1.44in split
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-18 19:10:30
#4751: Breaking change between 1.41 and 1.44in split
---------------------------------------------+------------------------------
Reporter: henry_christophe@⦠| Owner: pavol_droba
Type: Bugs | Status: new
Milestone: To Be Determined | Component: string_algo
Version: Boost 1.44.0 | Severity: Regression
Keywords: |
---------------------------------------------+------------------------------
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
(http://lists.boost.org/Archives/boost/2005/07/90266.php).
Furthermore, there has been, according to the release notes, no change
to string algo since the 1.41.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4751> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC