![]() |
![]()
| ![]() |
![]()
NAMEstd::shared_ptr::operatorbool - std::shared_ptr::operatorbool Synopsisexplicit operator bool() const noexcept;
Parameters(none) Return valuetrue if *this stores a pointer, false otherwise. Notes An empty shared_ptr (where use_count() == 0) may store a non-null
pointer accessible
Example// Run this code
Output: ptr is not a valid pointer.
See also get returns the stored pointer
|