Some $(D_KEYWORD enum).
$(D_KEYWORD true) if E contains only bit flags, $(D_KEYWORD false) otherwise.
enum Valid { none = 0, one = 1 << 0, two = 1 << 1, } static assert(isBitFlagEnum!Valid); enum Invalid { one, two, three, four, } static assert(!isBitFlagEnum!Invalid); enum Negative { one = -1, two = -2, } static assert(!isBitFlagEnum!Negative);
Determines whether E is a $(D_KEYWORD enum), whose members can be used as bit flags.
This is the case if all members of E are integral numbers that are either 0 or positive integral powers of 2.