Oneof

Create private anonymous union holding all requested types. This has probably a fair share of TODOs, e.g. it cannot hold multiple instances of the same type, the opEqual() is most likely sub-optimal, and probably a bunch of other things that I don't see as a D newbie.

Members

Functions

opEquals
bool opEquals(typeof(this) other)

To make testing for equality work for Oneof based types.

type
const(TypeInfo) type()

Return the TypeInfo of the type stored in the oneof union.

Mixins

__anonymous
mixin GenOps

Mixin some required operations like assignment, copy constructor, value getter.

Mixed In Members

From mixin GenOps

opAssign
typeof(this) opAssign(SubType value)

Assignment operator.

value
auto ref value()

Return value of requested type.

this
this(SubType value)

Create a Oneof given a value of a certain SubType.

Meta