
In C++11, shared_ptr has an explicit operator bool which means that a shared_ptr can't be implicitly converted to a bool. adding an explicit cast is a valid fix to the code.
In C++11, shared_ptr has an explicit operator bool which means that a shared_ptr can't be implicitly converted to a bool. adding an explicit cast is a valid fix to the code.