The OpenD Programming Language

isVariant

Checks if the type is instance of Algebraic.

enum bool isVariant(T);

Examples

static assert(isVariant!(Variant!(int, string)));
static assert(isVariant!(const Variant!(int[], string)));
static assert(isVariant!(Nullable!(int, string)));
static assert(!isVariant!int);

Meta