Boost logo

Boost :

From: Jon Trauntvein (j.trauntvein_at_[hidden])
Date: 2008-03-27 09:32:07


I recently made the switch from visual studio 2005 to visual studio
2008. I have a project that uses boost regular expressions as shown in
the following fragment:

bool StringCompDesc::is_valid_input(char const *s)
{
    bool rtn = strlen(s) <= max_len;
    if(rtn && validate_pattern.length())
    {
       boost::regex ex(validate_pattern.c_str());
       boost::cmatch what;
            
       rtn = boost::regex_match(s,what,ex);
    }
    return rtn;
} // is_valid_input

When this method is invoked with a value of "192.168.4.230" and a
validate_pattern value of "^([0-9]{1,3})?(\.[0-9]{1,3}){0,3}$" under the
release build, the program crashes. The stack trace shows that
match_results<>::set_size() winds up invoking
_invalid_parameter_noinfo(). I have seen this with both versions 1.33.1
and 1.34.1.

It would appear that visual studio 2008 is not a recognised build
environment for boost but, despite the warning messages emitted in the
boost headers, it has appeared to work until now. If anyone is aware of
a way to work around this problem, I would appreciate their advice.

Regards,

Jon Trauntvein


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk