아래의 간단한 프로그램에 대한 seg 오류가 발생합니다. 그것은 소멸자 match_results와 관련이있는 것 같습니다.boost :: regex segfaults 때 캡처를 사용
#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의 벡터 –