GlobalPtr.this - multiple declarations
Function GlobalPtr.this
Constructs a GlobalPtr
without managed object. Same as GlobalPtr
this
(
typeof(null) nil
) scope pure nothrow @nogc scope @safe;
Examples
GlobalPtr!long x = null;
assert(x == null);
assert(x == GlobalPtr!long .init);
Function GlobalPtr.this
Constructs a GlobalPtr
without managed object. Same as GlobalPtr
this
(
GlobalPtr . ElementReferenceType elm
) scope pure nothrow @nogc scope @safe;
this
(
const GlobalPtr . ElementReferenceType elm
) scope const pure nothrow @nogc scope @safe;
this
(
immutable GlobalPtr . ElementReferenceType elm
) scope immutable pure nothrow @nogc scope @safe;
this
(
shared GlobalPtr . ElementReferenceType elm
) scope shared pure nothrow @nogc scope @safe;
this
(
const shared GlobalPtr . ElementReferenceType elm
) scope shared const pure nothrow @nogc scope @safe;
Examples
{
GlobalPtr!long x = new long(42);
assert(x != null);
assert(x .get == 42);
}
{
static const long i = 42;
GlobalPtr!(const long) x = &i;
assert(x != null);
assert(x .get == 42);
}
Function GlobalPtr.this
Forward constructor (merge move and copy constructor).
this(Rhs, This)
(
auto scope ref Rhs rhs
) pure nothrow @nogc @trusted
if (isGlobalPtr!Rhs && isConstructable!(Rhs, This) && !is(Rhs == shared) && !isMoveCtor!(This, rhs));