Cbeam
Loading...
Searching...
No Matches
cbeam/memory/pointer.hpp

Construct a new pointer object from a std::shared_ptr<T>.

Construct a new pointer object from a std::shared_ptr<T>.This constructor allows the creation of a pointer object from a std::shared_ptr with any template argument. The lifetime of the referenced object is maintained by the shared pointer's reference count.

std::shared_ptr<MyType> my_shared_ptr = std::make_shared<MyType>();
cbeam::pointer ptr(my_shared_ptr);
Template Parameters
TThe type of the object that the std::shared_ptr is pointing to.
Parameters
ptrA std::shared_ptr to an object of type T.