Function IntrusivePtr.get
Get reference to managed object of ElementType
or value if ElementType
is reference type (class or interface) or dynamic array.
Examples
static struct Foo{
ControlBlock!(int, int) c;
int i;
this(int i)pure nothrow @safe @nogc{
this .i = i;
}
}
IntrusivePtr!Foo x = IntrusivePtr!Foo .make(123);
assert(x .get .i == 123);
x .get .i = 321;
assert(x .get .i == 321);
const y = x;
assert(y .get .i == 321);
assert(x .get .i == 321);
static assert(is(typeof(y .get) == const Foo));