Namespaces
Variants
Actions

std::shared_ptr<T>::operator bool

From cppreference.com
< cpp‎ | memory‎ | shared ptr
 
 
Memory management library
(exposition only*)
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
(until C++20*)
(until C++20*)

Garbage collector support (until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
 
 
explicit operator bool() const noexcept;

Checks if *this stores a non-null pointer, i.e. whether get() != nullptr.

Contents

[edit] Parameters

(none)

[edit] Return value

true if *this stores a pointer, false otherwise.

[