lundi 25 avril 2016

Very simple C++ code with RegExp crashes on Android but works fine on OS X

I have this simple C++ code with RegExp crashes on Android but works fine on OS X:

std::string str = "1x0-4x0";
std::regex regexRule( "([0-9]+)x([0-9]+)\\-([0-9]+)x([0-9]+)" );
std::smatch piecesMatch;
if ( std::regex_match( str, piecesMatch, regexRule ) )
    std::cout << "regex_match!\n";

Why does it crash? Am I missed something?

It compiles without any warnings.

Aucun commentaire:

Enregistrer un commentaire