对于下面的简单程序,我得到一个段错误。它似乎与析构函数match_results有关。boost :: regex使用捕获时的段错误
#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;
}
编辑:我使用升压1.39
在我的情况下,它正试图摧毁m_subs时访问无效的内存位置来自match_results的矢量 – 2014-12-10 10:45:06