I have a std::vector<char>, which is appended to and inserted to by
several callback functions. The appended and inserted objects are of
different types and sizes. Example (changed):
char_vector.resize (char_vector.size () + 4);
*((uint32_t *) &(char_vector.end ()[-4])) = uint32_value;
Well, now that I think about it again, I could use memcpy instead of
direct assignments into the vector. But this would mean a function may
be called where otherwise e.g. only an integer assignment would be
necessary...