A std::vector contains a buffer of continuous memory internally for a given type, with the exception of bools. Is there anyway of constructing a vector by specifying this buffer such that no coping of data is required?
I have a C api which gives me a buffer of data of a certain type. I would like to be able to manipulate this data via the functionality associated with std::vector, such as std::vector<>::iterator, begin(), end() etc.
Maybe you have a better suggestion as to how I might work with these buffers, as they are huge and I don't wish to copy them.
The api allocates the memory and provides a function which I call to tell it to release it again.