Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions include/tscore/BufferWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ class BufferWriter
};

/** A @c BufferWrite concrete subclass to write to a fixed size buffer.
*
* Copies and moves are forbidden because that leaves the original in a potentially bad state. An
* instance is cheap to construct and should be done explicitly when needed.
*/
class FixedBufferWriter : public BufferWriter
{
Expand All @@ -231,10 +234,8 @@ class FixedBufferWriter : public BufferWriter

FixedBufferWriter(const FixedBufferWriter &) = delete;
FixedBufferWriter &operator=(const FixedBufferWriter &) = delete;
/// Move constructor.
FixedBufferWriter(FixedBufferWriter &&) = default;
/// Move assignment.
FixedBufferWriter &operator=(FixedBufferWriter &&) = default;
FixedBufferWriter(FixedBufferWriter &&) = delete;
FixedBufferWriter &operator=(FixedBufferWriter &&) = delete;

FixedBufferWriter(MemSpan &span) : _buf(span.begin()), _capacity(static_cast<size_t>(span.size())) {}

Expand Down