I want to implement a dynamic task queue like so:
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 sort of default value for std::function to check against?
 
     
    