isBoolean

Detect whether T is a built-in boolean type or enum of boolean base type.

enum bool isBoolean(T);

Examples

static assert( isBoolean!bool);
enum EB : bool { a = true }
static assert( isBoolean!EB);

struct SubTypeOfBool
{
    bool val;
    alias val this;
}
static assert(!isBoolean!(SubTypeOfBool));

Meta