When the current position on a rawptr_buffer is at EOF, can_read() returns false.
This behavior is not consistent with that of the other types of buffers.
In particular, it prevents the seekpos method to work, for example to get back to the beginning of the buffer.
Here is a modified version of the streambuf_acquire_release test to demonstrate the problem:
```
template<class StreamBufferType>
void streambuf_acquire_release(StreamBufferType& rbuf, const std::vector<typename StreamBufferType::char_type>& )
{
VERIFY_IS_TRUE(rbuf.can_read());
typename StreamBufferType::char_type * ptr = nullptr;
size_t size = 0;
rbuf.acquire(ptr, size);
if (ptr != nullptr)
{
VERIFY_IS_TRUE(size > 0);
rbuf.release(ptr, size);
}
// Fails only on rawptr_buffer
VERIFY_IS_TRUE(rbuf.can_read());
VERIFY_IS_TRUE(rbuf.close().get());
VERIFY_IS_FALSE(rbuf.can_read());
}
```
Comments: Addressed in v1.0.0
This behavior is not consistent with that of the other types of buffers.
In particular, it prevents the seekpos method to work, for example to get back to the beginning of the buffer.
Here is a modified version of the streambuf_acquire_release test to demonstrate the problem:
```
template<class StreamBufferType>
void streambuf_acquire_release(StreamBufferType& rbuf, const std::vector<typename StreamBufferType::char_type>& )
{
VERIFY_IS_TRUE(rbuf.can_read());
typename StreamBufferType::char_type * ptr = nullptr;
size_t size = 0;
rbuf.acquire(ptr, size);
if (ptr != nullptr)
{
VERIFY_IS_TRUE(size > 0);
rbuf.release(ptr, size);
}
// Fails only on rawptr_buffer
VERIFY_IS_TRUE(rbuf.can_read());
VERIFY_IS_TRUE(rbuf.close().get());
VERIFY_IS_FALSE(rbuf.can_read());
}
```
Comments: Addressed in v1.0.0