NullableRef.isNull

Returns true if and only if this is in the null state.

struct NullableRef(T)
@property const @safe pure nothrow
bool
isNull
()

Return Value

Type: bool

true if this is in the null state, otherwise false.

Examples

NullableRef!int nr;
assert(nr.isNull);

int* n = new int(42);
nr.bind(n);
assert(!nr.isNull && nr == 42);

Meta

Suggestion Box / Bug Report