I want to implement a dynamic task like this:
typedef std::function<void(void)> Job;
typedef std::function<Job(void)> JobGenerator;
JobGenerator gen = ...;
auto job = gen();
while (IsValidFunction(job))
{
job();
}
How can i implement IsValidFunction? Is there a default value for std::functionto check for?
source
share