std::shared_ptr::get
From cppreference.com
< cpp | memory | shared ptr
T* get() const; |
(until C++17) | |
element_type* get() const; |
(since C++17) | |
Returns the stored pointer.
Parameters
(none)
Return value
The stored pointer.
Exceptions
noexcept specification:
noexcept
Notes
A shared_ptr
may share ownership of an object while storing a pointer to another object. get()
returns the stored pointer, not the managed pointer.