The OpenD Programming Language

allSameType

enum bool allSameType(Ts...);

Return Value

true iff all types Ts are the same.

Examples

static assert(allSameType!());
static assert(allSameType!(int));
static assert(allSameType!(int, int));
static assert(allSameType!(int, int, int));
static assert(allSameType!(float, float, float));
static assert(!allSameType!(int, double));
static assert(!allSameType!(int, float, double));
static assert(!allSameType!(int, float, double, real));
static assert(!allSameType!(short, int, float, double, real));

Meta