Is there a way to create an ostream instance which basically doesn\'t do anything ?
For example :
std::ostream dummyStream(...);
dummyStream <<
The basic method voor new stream classes is:
std::streambuf;std::ostream with one member, your streambuf class.I'm afraid you won't get rid of the formatting step, though.
Hopefully this gives you some pointers; I don't have the time to expand this into a full answer, sorry.
Update: See john's answer for details.