TypeOf

Maps a kind enumeration value to the corresponding field type.

kind must be a value of the TaggedAlgebraic!T.Kind enumeration.

Members

Aliases

TypeOf
alias TypeOf = FieldTypeTuple!U[kind]
Undocumented in source.
U
alias U = TemplateArgsOf!(typeof(kind))
Undocumented in source.

Examples

static struct S {
	int a;
	string b;
	string c;
}
alias TA = TaggedAlgebraic!S;

static assert(is(TypeOf!(TA.Kind.a) == int));
static assert(is(TypeOf!(TA.Kind.b) == string));
static assert(is(TypeOf!(TA.Kind.c) == string));

Meta