I'm currently investigating portable, idiomatic, standard library-only C++ methods of writing binary data into a std::vector<char>
. I would like to interface with the container in the same manner as I would any other binary ostream, using the write() function.
So far the only thing I have turned up is inheriting from std::basic_streambuf<>
. Are there any better alternatives to this?