Copy constructor and copy-assignment of any stream class in C++ has been made private
. That means, you cannot make copy of std::ostringstream
object:
std::ostringstream ss;
std::ostringstream ss1(ss); //not allowed - copy-constructor is private
ss1=ss; //not allowed - copy-assignment is private