I tried your suggestion, and it appears that I still have the same errors.
Anyone have any other ideas?
Yes, I didn't spot your other error: the type boost::cmatch is typedef'ed
as:
typedef match_results cmatch;
But you're not searching a const char*, you're searching a
std::string::const_iterator (the two are the same type on VC6, but not on
VC7 and later), so the typedef:
typedef match_resultsstd::string::const_iterator smatch;
is the right one to use, here's the corrected code:
int main(int argc, char* argv[])
{
std::string m_rBuffer;
boost::regex m_rStartExp;
std::string::const_iterator rRawDataBegin = m_rBuffer.begin();
std::string::const_iterator rRawDataEnd = m_rBuffer.end();
boost::smatch rStartMessage;
boost::match_flag_type flags = boost::match_default;
while ( boost::regex_search(rRawDataBegin,
rRawDataEnd,
rStartMessage,
m_rStartExp,
flags) )
{
rRawDataBegin = rStartMessage[0].first;
}
}
John