|
Boost Users : |
From: Michiel Helvensteijn (m.helvensteijn_at_[hidden])
Date: 2008-07-16 18:20:34
Ok, the subject-line might be a bit confusing. :-)
I have the following template function:
template<class T>
bool is(const string& str);
Its implementation is not important. It checks if a string can be converted
to type T by std::stringstream. I also have the following function:
template <class T>
function<bool (T)> neg(function<bool (T)> func) {
return !bind(func, _1);
}
Which I use in the following way:
BOOST_CHECK_PREDICATE( neg(is<int>), ("text") );
But the compiler (GCC 4.1.2) complains:
error: no matching function for call to 'neg(<unresolved overloaded function
type>)'
What's the problem. And, also, what's the solution? :-)
Thanks in advance!
-- Michiel Helvensteijn
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net