isSumType

True if T is a SumType or implicitly converts to one, otherwise false.

Members

Aliases

AliasThisType
alias AliasThisType = ReturnType!((T t) => __traits(getMember, t, __traits(getAliasThis, T)[0]))
Undocumented in source.

Manifest constants

isSumType
enum isSumType;
Undocumented in source.
isSumType
enum isSumType;
Undocumented in source.
isSumType
enum isSumType;
Undocumented in source.

Examples

static struct ConvertsToSumType
{
	SumType!int payload;
	alias payload this;
}

static struct ContainsSumType
{
	SumType!int payload;
}

assert(isSumType!(SumType!int));
assert(isSumType!ConvertsToSumType);
assert(!isSumType!ContainsSumType);

Meta