Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-01-28 04:18:42


Klemens Morgenstern wrote:
> Additionally, I feel some need for a library managing raw memory. It's quite
> common to just use vector<unsigned char>, but I find this incorrect, because
> it's typed. Raw memory doesn't have a type, which is why malloc returns
> void* and not unsigned char*.

Raw memory bytes do have a type, and it's `unsigned char`.

> Thus a container type for a chunk of raw memory should also be included.
> I.e. something akin to a vector<void> if you will. Or like `bytes` in python.

You can in principle use std::byte for this, which is why it was added. Of course
they had to ruin it by adding operations to it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk