std::shared_ptr::operatorbool (3) Linux Manual Page
std::shared_ptr<T>::operatorbool – std::shared_ptr<T>::operatorbool Synopsis explicit operator bool() const noexcept; Checks if *this stores a non-null pointer, i.e. whether get() != nullptr. Parameters (none) Return value true if *this stores a pointer, false otherwise. Notes An empty shared_ptr (where use_count() == 0) may store a non-null pointer accessible by get(), e.g. if it were created using…
