arbitrary_positional_facade.hpp line 325 may result in res less than n at end of file. Specifically this code at lines 330 and 331:
count_ = block_size_ - n;
total += n;
leaves count_ with residual bytes when there are none such that a subsequent call to read will return data when no data is available. I believe these should be something along the lines of:
if (res > n)
{
count_ = res - n;
total += n;
}
else
{
count_ = 0;
total += res;
}
Thus if block size is say 3 and only 2 bytes are read at the end of file there will not be a residual of 1 byte for the next call to read. Rather, the next call will return the expected 0 bytes indicating end of file.
arbitrary_positional_facade.hpp line 325 may result in res less than n at end of file. Specifically this code at lines 330 and 331:
leaves count_ with residual bytes when there are none such that a subsequent call to read will return data when no data is available. I believe these should be something along the lines of: Thus if block size is say 3 and only 2 bytes are read at the end of file there will not be a residual of 1 byte for the next call to read. Rather, the next call will return the expected 0 bytes indicating end of file.