mercredi 21 mars 2018

This simple regex declaration causes an assertion deep in the VS2017 implementation. Is it my code or a compiler bug?

static bool IsLabel(const std::string &val)
{
    static std::regex rGroupRegex("​^[rR][0-9]*[0-9]$"); <---- crashes at this line
    return std::regex_match(val, rGroupRegex);
}

and the location of the exception is in the file "regex"

template<class _FwdIt,
class _Elem,
class _RxTraits> inline
void _Parser<_FwdIt, _Elem, _RxTraits>::_Error(
    regex_constants::error_type _Code)
{   // handle error
_Xregex_error(_Code); <---- exception here
}

Aucun commentaire:

Enregistrer un commentaire