I’m trying to create a packaged task with a functor like this:
Worker w(someString, anotherString, i*length,length);
boost::packaged_task<Match> task(&w);
Operator in the Worker-class is looking like this:
Class Worker {
Match operator()()
{
return matchText(..., ..., ..., ...);
}
}
Compiler gives me error (translated the error-message from German)
C2064: Statement results in no function which passes 0 arguments
What am I doing wrong?
The constructor of boost::packaged_task expects a functor object (either lvalue or rvalue), not a pointer to it.
or