
I used the regex library from version 1.28.0 with BCB6. I was able to
have a single function
CommentsStrings::MatchFound(boost::match_resultstd::string::const_iterator
what);
to process both a std::string and a boost::mapfile.
The calling functions are:
//---------------------------------------------------------------------------
void CommentsStrings::Analyse(const std::string& Buffer)
{
Buffer_ = Buffer;
AllCommentsStrings_.clear();
// find comments and strings
std::string::const_iterator start, end;
start = Buffer_.begin();
end = Buffer_.end();
boost::regex_grep(
std::bind1st(std::mem_fun(&CommentsStrings::MatchFound), this),
start,
end,
CommentStringExpression);
}
//---------------------------------------------------------------------------
void CommentsStrings::Analyse(const char *file)
{
currentFile = file;
AllCommentsStrings_.clear();
// find comments and strings
boost::mapfile f(currentFile.c_str());
boost::mapfile::iterator start, end;
start = f.begin();
end = f.end();
boost::regex_grep(
std::bind1st(std::mem_fun(&CommentsStrings::MatchFound), this),
start,
end,
CommentStringExpression);
}
Now I am using BDS2006 and boost 1_33_1 I am getting an error
Could not find a match for
'std::bind1st