25 #ifndef SER4CPP_BUFFER_H 26 #define SER4CPP_BUFFER_H 28 #include "ser4cpp/container/SequenceTypes.h" 29 #include "ser4cpp/util/Uncopyable.h" 44 explicit Buffer(uint32_t length) :
46 bytes(std::make_unique<uint8_t[]>(length))
55 this->as_wslice().copy_from(input);
58 inline rseq_t as_rslice()
const 60 return rseq_t(this->bytes.get(), this->length());
65 return wseq_t(this->bytes.get(), this->length());
69 std::unique_ptr<uint8_t[]> bytes;
74 #endif // SER4CPP_BUFFER_H
ser4cpp header-only library namespace