Function SharedPtr.get

Get reference to managed object of ElementType or value if ElementType is reference type (class or interface) or dynamic array.

inout inout(SharedPtr.ElementType) get() pure nothrow @nogc @property @system;

Doesn't increment useCount, is inherently unsafe.

Examples

SharedPtr!long x = SharedPtr!long.make(123);
assert(x.get == 123);
x.get = 321;
assert(x.get == 321);
const y = x;
assert(y.get == 321);
assert(x.get == 321);
static assert(is(typeof(y.get) == const long));