Hello Eric,
this code fragment will crash, since 'what' uses iterators into the invalid string
x::smatch what;
if(x::regex_match(std::string(" (some_type_ptr) xyz,"), what, regex)) //string goes out of scope after this sentance
{
std::cout << what[0] << endl; // boom! string iterators are no longer valid
std::cout << what[1] << endl;
}
May be there is a way to probit this kind of behaviour during the compilation or at least this can be stated in the docs...
With Kind Regards,
Ovanes