Nullable.opCast

bool opCast(T : bool)() const

Returns true if this has a value, otherwise false.

Allows a Nullable to be used as the condition in an if statement:

if (auto result = functionReturningNullable())
{
   doSomethingWith(result.get);
}

T opCast(T, this This)() if (is(This : T) || This.sizeof == T.sizeof) ref

Prevents opCast from disabling built-in conversions.