isSumType

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

enum bool isSumType(T);

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