std::shared_ptr<T>::operator bool
From cppreference.com
< cpp | memory | shared ptr
|
|
Member functions | ||||
Modifiers | ||||
Observers | ||||
(C++17) | ||||
(until C++20*) | ||||
shared_ptr::operator bool | ||||
(C++26) | ||||
(C++26) | ||||
Non-member functions | ||||
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20) | ||||
functions (until C++26*) | ||||
Helper classes | ||||
(C++20) | ||||
Deduction guides(C++17) |
explicit operator bool() const noexcept; |
||
Checks if *this stores a non-null pointer, i.e. whether get() != nullptr.
Contents |
(none)
true if *this stores a pointer, false otherwise.