
16 Jul
2008
16 Jul
'08
10:20 p.m.
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