Module btl.autoptr.common

Common code shared with other btl.autoptr modules .


ControlBlock Control block for SharedPtr, RcPtr, UniquePtr and IntrusivePtr.


apply Sefly dereference all args of types SharedPtr, RcPtr and IntrusivePtr and forward them to callable alias fn.

Manifest constants

isControlBlock Check if type T is of type ControlBlock!(...).
isIntrusive Return number of ControlBlocks in type Type.
isSmartPtr Check if T is smart pointer of type SharedPtr, RcPtr or IntrusivePtr.


ControlBlockDeduction impl This template deduce ControlType shared qualifier in SharedPtr, RcPtr and UniquePtr.
DefaultAllocator std.experimental.allocator.mallocator.Mallocator Default allcoator for SharedPtr.make, RcPtr.make, UniquePtr.make and IntrusivePtr.make.
DestructorAllocatorType typeof(&impl!()) Similiar to DestructorType but returns destructor attributes of type Allocator and attributes of methods void[] allocate(size_t) and void deallocate(void[]).
DestructorDeleterType typeof(&impl!()) Similiar to DestructorType but returns destructor attributes of type Deleter and attributes necessary to call variable of type Deleter with parameter of type T.
DestructorType typeof(&impl!()) Destructor type of destructors of types Types ( void function(Evoid*)@destructor_attributes ).
Evoid btl.lifetime.Evoid Type used as parameter for function pointer returned from DestructorType.
Forward Forward Type used in forward constructors.
IntrusiveControlBlock impl Alias to ControlBlock including qualifiers contained by Type.
isDestructorType btl.lifetime.isDtorType Check if type Type is of type destructor type (is(void function(Evoid* )pure nothrow @safe @nogc : Type))
SharedControlBlock ControlBlock!(int,int) Default ControlBlock for SharedPtr and RcPtr.
UniqueControlBlock ControlBlock!(void,void) Default ControlBlock for UniquePtr.