btl.autoptr.shared_ptr

Implementation of reference counted pointer SharedPtr (similar to c++ std::shared_ptr).

Members

Functions

dynCast
UnqualSmartPtr!Ptr.ChangeElementType!T dynCast(Ptr ptr)

Dynamic cast for shared pointers if ElementType is class with D linkage.

dynCastMove
UnqualSmartPtr!Ptr.ChangeElementType!T dynCastMove(Ptr ptr)

Dynamic cast for shared pointers if ElementType is class with D linkage.

first
auto first(Ptr ptr)

Return SharedPtr pointing to first element of array managed by shared pointer ptr.

share
shared(Ptr) share(Ptr ptr)

Return shared SharedPtr pointing to same managed object like parameter ptr.

sharedPtr
auto sharedPtr(Ptr ptr)

Create SharedPtr from parameter ptr of type SharedPtr, RcPtr or IntrusivePtr.

Templates

SharedPtr
template SharedPtr(_Type, _DestructorType = DestructorType!_Type, _ControlType = ControlBlockDeduction!(_Type, SharedControlBlock), bool _weakPtr = false)

Implementation of a ref counted pointer with support for aliasing.

SharedPtr
template SharedPtr(_Type, _ControlType, _DestructorType = DestructorType!_Type, bool _weakPtr = false)

Alias to SharedPtr with different order of template parameters

WeakPtr
template WeakPtr(_Type, _DestructorType = DestructorType!_Type, _ControlType = ControlBlockDeduction!(_Type, SharedControlBlock))
template WeakPtr(_Type, _ControlType, _DestructorType = DestructorType!_Type)

Weak pointer.

isSharedPtr
template isSharedPtr(T)

Check if type T is SharedPtr.

Meta

Authors

Adam Búš