Hello List,
I am having an issue compiling the my code - I get the following error:
xml.hpp:43: error: no matching function for call to
‘regex_search(boost::asio::buffers_iterator&, boost::asio::buffers_iterator&,
boost::match_results,
std::allocator > > >&, boost::_bi::bind_t,
boost::_bi::list1 > >,
boost::regex_constants::match_flags)’
Here is the related code snippet:
template <typename iterator>
std::pair operator()(
iterator begin,
iterator end
) const {
if(begin == end) {
return std::make_pair(end,false);
}
boost::match_results<iterator> match_results;
//Compiler Error Start
if(boost::regex_search(
begin,
end,
match_results,
boost::bind(
&parser::regex,
this
),
boost::match_default | boost::match_partial)) {
//Compiler Error End
if(match_results[0].matched) {
//test
return std::make_pair(match_results[0].second,true);
}else{
//test
return std::make_pair(match_results[0].first,false);
}
}
return std::make_pair(end,false);
};
private:
boost::regex regex(
){
return XMLDecl_;
};
static boost::regex S_, Eq_, EncName_, VersionInfo_,
EncodingDecl_, SDDecl_, XMLDecl_,
UTF8_, Char_, NameStartChar_,
NameChar_, Name_, Names_, Comment_,
PITarget_, PI_, Misc_, prolog_;
Could someone please shed some light on this problem for me. I want to
be able to change the regular expression based on a state variable so
that operator() can advance to the next xml type that it should/could
encounter.
Thank you.
Etienne