Semantics of CCBV.resize
favonia opened this issue · 2 comments
favonia commented
I am confused by the current code.
- Should this be
true
orfalse
? Current, it returnstrue
.
let bv = CCBV.create ~size:3 true in CCBV.resize bv 1; CCBV.get bv 2
- Should this be exception-free? Current, it raises an exception.
let bv = CCBV.create ~size:1 true in CCBV.resize bv 0
c-cube commented
is this still relevant?
favonia commented
I just skimmed through the code and I suppose the new code does what's expected (that is, it does seem to clear higher bits and does not seem to complain about the zero size).