require

You can use this to do an easy null check or a dynamic cast+null check on any element.

T
require
(
T = Element
string file = __FILE__
int line = __LINE__
)
if (
is(T : Element)
)
out (ret) { assert (ret !is null); }

See Also

Meta