template newBitVectorStack[B](bits: int, init): untyped = #using defined at runtime length array var blocks = ceilDiv(bits, sizeOf(B)8) var bv: BitVecV[B] type T = B bv.Base = newVLA(B, blocks, init) bv.size = bits bv template newVLA(T: typedesc, n: int, init = 0): untyped =