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