Hi, I want to derive a stringstream so that I can use the operator<< to construct a message which will then be thrown. The API would look like:
error("some text") << " more text " << 42 << std::endl;
This should do a
throw "some text more text 42"
So what I did is make an errorbuf (inheriting from streambuf) which overloads the 'overflow' method and then create an ostream(&errorbuf). I wonder if I shouldn't instead inherit from basic_ostringstream or something...