Question: what is operator bool in c++?
Answer: std::function::operator bool Returns whether the object is callable. A function object is callable if it is not an empty function (i.e., if it has a callable object as target).