I'm using std::ostringstream to serialize data to send it through sockets later. Now I'm using std::ostringstream::str() function to get access to the data, but I would like to avoid copying the data.
Is this possible to get access to the underlying data buffer in std::ostringstream (const char* or something similar)?