Closed nlyan closed 9 years ago
Good point! It means we can do away with the size_type
additions and subtractions. I'll update the implementation and explanation.
Updated README and the basic implementation. In doing so I found a few bugs with it which would have caused it to fail when the most significant bit of size is 1.
It strikes me that the msb of the size field can't be 1 when the msb of the capacity field is 0. If you put these two bits together in the form 0bCS then you can XOR with 0b01 to bring it down to 0b00 for null termination purposes.