Hello List,
Just a general question:
I am trying to use boost::asio::async_read_until with a these templated
functions:
template<typename D>
struct entity {
template<typename T>
std::pair operator()(
T begin,
T end
) {
if(begin == end) {
return std::make_pair;
}
return static_cast(this)->impl(begin,end);
};
};
/* http://www.w3.org/TR/REC-xml/#NT-S */
struct white_space
: entity {
template<typename T>
std::pair impl(
T begin,
T end
) {
for(; begin != end; begin++) {
if(*begin == 0x09u || *begin == 0x0Au ||
*begin == 0x0Du || *begin == 0x20u) {
continue;
}else{
return std::make_pair;
}
}
return std::make_pair;
};
};
I get the following error:
xml.hpp:146: error: conversion from β<unresolved overloaded function
type>β to non-scalar type
βstd::pair, bool>β requested
At every line that I have a return defined...
Could someone please explain to me what I have done wrong here....
Thank you,
Etienne