This seems exceptionally complicated. What about: `return iota(0, size).filter!(i => this[i])();` ?

Yours might be faster for the special case of (very) empty bitsets, but it seems complicated for the more general case.

Also, there should be a way to obtain the "bits unset". I'm not sure you can do it trivially from `bitsSet`? Then again, there is no `bitsUnset(T)(T t)`, so I don't its absence as a problem.