RcPtr.opCast - multiple declarations
Function RcPtr.opCast
Checks if this
stores a non-null pointer, i.e. whether this != null
.
bool opCast(To)() const pure nothrow @nogc scope @safe
if (is(To : bool));
Examples
RcPtr!long x = RcPtr!long .make(123);
assert(cast(bool)x); //explicit cast
assert(x); //implicit cast
x = null;
assert(!cast(bool)x); //explicit cast
assert(!x); //implicit cast
Function RcPtr.opCast
Support for quelifier cast.
ref To opCast(To, This)() pure nothrow @nogc scope
if (is(immutable(To) : immutable(typeof(this))));