IntFlags.clear

Clear all flags, and return the set of flags that were previously set.

raise!(IntFlagPolicy.throws)(IntFlags.local.clear()) is a convenient way that the caller of a nothrow function can convert any flags that were raised into an exception.

struct IntFlags
clear
pure @safe nothrow @nogc
(
)

Examples

IntFlags.local = IntFlag.posOver | IntFlag.negOver;
assert(IntFlags.local.clear() == (IntFlag.posOver | IntFlag.negOver));
assert(!IntFlags.local);

Meta