Function RcPtr.get

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

inout inout(RcPtr.ElementType) get() pure nothrow @nogc @property @safe;

Examples

RcPtr!long x = RcPtr!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));