I am compiling the following code with VS2013:
if (std::regex_match(string("10-11-1982 11:22:31"), match, std::regex("(\\d{2}-\\d{2}-\\d{4} \\d{2}:\\d{2}:\\d{2})"))) {
std::cout << "Match size:" << match.size() << std::endl;
for (size_t i = 0; i < match.size(); ++i) {
std::ssub_match sub_match = match[i];
std::string piece = sub_match.str(); // <-- Interrumption here
std::cout << " submatch " << i << ": " << piece << '\n';
}
}
When the commented line is executed the following dialog appears:
What is wrong with my code?