RefCounted

A reference-counted smart pointer similar to C++'s std::shared_ptr.

Constructors

this
this(auto ref Args args)

The allocator is a singleton, so no need to pass it in to the constructor

this
this(Allocator allocator, auto ref Args args)

Non-singleton allocator, must be passed in

Destructor

~this
~this()

Postblit

this(this)
this(this)

Alias This

_impl

Members

Functions

construct
typeof(this) construct(auto ref Args args)

Factory method so can construct with zero args.

construct
typeof(this) construct(auto ref Allocator allocator, auto ref Args args)

Factory method. Not necessary with non-global allocator but included for symmetry.

opAssign
void opAssign(ref RefCounted other)

Assign to an lvalue RefCounted

opAssign
void opAssign(RefCounted other)

Assign to an rvalue RefCounted

opIndex
auto ref opIndex(auto ref A args)
opIndexAssign
auto ref opIndexAssign(auto ref A args)

Prevent opSlice and opIndex from being hidden by Impl*. This comment is deliberately not DDOC.

opSlice
auto ref opSlice(auto ref A args)

Prevent opSlice and opIndex from being hidden by Impl*. This comment is deliberately not DDOC.

opUnary
auto ref opUnary()

Dereference the smart pointer and yield a reference to the contained type.

Meta