10std::unique_ptr<byte_buffer>
byte_buffer::duplicate()
const
13 this->convert(duplicate);
14 std::unique_ptr<byte_buffer> result {
20byte_buffer_impl<std::string>::byte_buffer_impl(
const std::string& str) : m_buffer(str) {}
21byte_buffer_impl<std::string>::byte_buffer_impl(std::string&& str) : m_buffer(std::move(str)) {}
26 std::copy(m_buffer.begin(), m_buffer.end(), std::back_inserter(buffer));
31 return m_buffer.size();
34std::unique_ptr<byte_buffer>
byte_buffer_impl<std::nullptr_t>::duplicate()
const
36 return std::unique_ptr<byte_buffer> {
new byte_buffer_impl<std::nullptr_t>() };
42 m_wrapper(other.m_wrapper->duplicate())
48 m_wrapper = other.m_wrapper->duplicate();