At the moment, read_some is specified as
template<MutableBufferSequence Buffers>
IoAwaitable auto read_some(Buffers buffers);
That is, it takes buffers by value.
This doesn't seem correct. It would imply that std::vector<mutable_buffer> is required to be copied by read_some, which is unnecessary.
And if we change this to e.g. Buffers&& buffers, we need to clarify that read_some doesn't mutate buffers in the lvalue case, so that the caller can still use buffers in a subsequent read_some (or write_some) call.
The rvalue case is trickier, but we need to have clarity on #261 before deciding.
At the moment,
read_someis specified asThat is, it takes
buffersby value.This doesn't seem correct. It would imply that
std::vector<mutable_buffer>is required to be copied byread_some, which is unnecessary.And if we change this to e.g.
Buffers&& buffers, we need to clarify thatread_somedoesn't mutatebuffersin the lvalue case, so that the caller can still usebuffersin a subsequentread_some(orwrite_some) call.The rvalue case is trickier, but we need to have clarity on #261 before deciding.