basic_ostream has no default constructor. We know that ostringstream has a default constructor. Therefore, ostringstream must be supplying a stream buffer to its ostream base.

Similarly for istringstream. And for stringstream.

We just can't get this to join up. So we've ended up with this crazy class hierarchy because of these stream buffers.

Let's take a look at the stream buffer inheritance diagram.