I get a seg fault for the simple program below. It seems to be related to the destructor match_results.
#include <iostream>
#include <vector>
#include <string>
#include <boost/regex.hpp>
using namespace std;
int main(int argc, char *argv)
{
boost::regex re;
boost::cmatch matches;
boost::regex_match("abc", matches, re.assign("(a)bc"));
return 0;
}
edit: I am using boost 1.39
boost::regex is one of the few components of boost that doesn’t exist solely in header files…there is a library module.
It is likely that the library you are using was built with different settings than your application.
Edit: Found an example scenario with this known boost bug, where boost must be built with the same
-malign-doubleflag as your application.This is one of several possible scenarios where your boost library will not have binary compatibility with your application.