Optional

Undocumented in source.

Constructors

this
this(T value)

Undocumented in source.

Destructor

~this
~this()

Undocumented in source.

Members

Functions

_get
inout(T) _get()

Undocumented in source.

opAssign
U opAssign(U value)

Undocumented in source. Be warned that the author may not have intended to support it.

opOpAssign
void opOpAssign(RHS rhs)

Undocumented in source. Be warned that the author may not have intended to support it.

Structs

UseMemcpyMove
struct UseMemcpyMove

Undocumented in source.

Unions

DontCallDestructor
union DontCallDestructor

Undocumented in source.

Variables

isNull
bool isNull;

Undocumented in source.

Examples

Optional!(int[]) intArrayOptional;

assert(intArrayOptional.isNull);

intArrayOptional ~= 5;

assert(!intArrayOptional.isNull);
assert(intArrayOptional._get == [5]);

intArrayOptional ~= 6;

assert(intArrayOptional._get == [5, 6]);
import std.typecons : Nullable;

Optional!(const(Nullable!int)) nullableArrayOptional;

nullableArrayOptional = Nullable!int();

Meta