stringstream reads and writes, so it must be derive from basic_iostream.

Whoa, Nelly! What's wrong with this picture!

stringstream is not an istringstream
stringstream is not an ostringstream


Why the hell not? What crazy scheme is going on here? Does this make any sense?

Recall our 2nd opening question - "where does a stream go?"