7 m_data(data != nullptr? new char[size]: nullptr),
10 assert(data ==
nullptr? size == 0: size > 0);
15 m_data(other.m_size == 0? nullptr: new char[other.m_size]),
18 memcpy(m_data.get(), other.m_data.get(), other.m_size);
22 m_data(std::move(other.m_data)),
28 m_data.reset(other.m_size == 0?
nullptr:
new char[other.m_size]);
29 memcpy(m_data.get(), other.m_data.get(), other.m_size);
31 m_size = other.m_size;
38 assert(
this != &other);
39 m_data = std::move(other.m_data);
40 m_size = other.m_size;
size_t size() const
Used to get the size of the contained 'blob'.
const void * data() const
The raw data of the blob's contents.
blob(const void *data, const size_t size)
Constructs a blob object with contents of data.
blob & operator=(const blob &other)
Copy assignment operator.