I tried using std :: ptr_fun to wrap my function, but when I try to wrap a function using the void parameter and bool return type i, you get an error:
code:
std::function<bool()> cr = std::not1(std::ptr_fun(&funct1));
function:
bool funct1() { return false; }
error:
error: no matching function for call to 'ptr_fun(bool (*)())'
but whenever I change the parameter to int, the problem seems to disappear.
how do i wrap a function using the void parameter ???
source share