2 #include <msp/strings/format.h>
11 void Buffer::storage(size_t sz)
16 throw incompatible_data("Buffer::storage");
20 throw invalid_argument("Buffer::storage");
27 void Buffer::data(const void *d)
29 return sub_data(0, size, d);
32 void Buffer::sub_data(size_t off, size_t sz, const void *d)
35 throw invalid_operation("Buffer::sub_data");
37 BufferBackend::sub_data(off, sz, d);
40 void Buffer::require_size(size_t req_sz) const
43 throw buffer_too_small(format("buffer has %d bytes; %d required", size, req_sz));