TaggedUnion.TaggedUnion

Undocumented in source.

Constructors

this
this(TaggedUnion other)
Undocumented in source.
this
this(FieldTypes[ti] value)
Undocumented in source.
this
this()
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

FieldDefinitionType
alias FieldDefinitionType = U
Undocumented in source.
FieldTypeByName
alias FieldTypeByName(string name) = FieldTypes[__traits(getMember, Kind, name)]
Undocumented in source.
FieldTypes
alias FieldTypes = UnionKindTypes!Kind
Undocumented in source.
Kind
alias Kind = UnionFieldEnum!U

A type enum that identifies the type of value currently stored.

fieldNames
alias fieldNames = UnionKindNames!Kind
Undocumented in source.

Functions

opAssign
void opAssign(TaggedUnion other)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
void opAssign(FieldTypes[ti] value)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
T opCast()

Enables conversion or extraction of the stored value.

opEquals
bool opEquals(TaggedUnion other)

Enables equality comparison with the stored value.

set
void set()

Sets a void value of the specified kind.

set
FieldTypes[kind] set(FieldTypes[kind] value)

Sets a new value of the specified kind.

toHash
size_t toHash()

Enables using a tagged union value as an associative array key.

toString
void toString(W w)

Converts the contained value to a string.

Properties

hasType
bool hasType [@property getter]

Checks whether the currently stored value has a given type.

kind
Kind kind [@property getter]

The type ID of the currently stored value.

trustedGet
inout(T) trustedGet [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
value
inout(FieldTypes[kind]) value [@property getter]

Accesses the contained value by reference.

value
inout(T) value [@property getter]

Accesses the contained value by reference.

Meta