Hi,

 

I’m having trouble porting some code to use v1.34.0 of boost.

We are using the spirit parser and have found that strings containing trailing white space are not parsed as before.

The following code is a simple example of the problem. This code works with boost 1.33.1 but not 1.34.0.

 

Can anyone help explain why the code no longer works and what we should do to fix the problem?

 

Regards,

Andy

 

#include <string>

#include <iostream>

#include <boost/spirit/core.hpp>

 

using namespace std;

using namespace boost::spirit;

 

bool parseStr(const string& str)

{

      return parse(str.c_str(), real_p >> *(',' >> real_p), space_p).full;

}

 

int main(int argc, _TCHAR* argv[])

{

      string s1 = "1,2,3,4,5";

      string s2 = "1,2,3,4,5 ";

 

      cout << "parsing: '" << s1 << "' : " << (parseStr(s1) ? "OK" : "ERROR") << endl;

      cout << "parsing: '" << s2 << "' : " << (parseStr(s2) ? "OK" : "ERROR") << endl;

      return 0;

}