core.bitop.bsf without the undefined behaviour. smartOp.bsf(0) will raise IntFlag.undef.
import checkedint.sticky : smartOp; assert(smartOp.bsf(20) == 2); smartOp.bsf(0); assert(IntFlags.local.clear() == IntFlag.undef);
See Implementation
core.bitop.bsf without the undefined behaviour. smartOp.bsf(0) will raise IntFlag.undef.