Note that the destructor of the classes basic_istream and basic_ostream does not delete the
corresponding stream buffer (it was not opened by these classes, anyway). Thus, you can pass a
stream device by using a pointer instead of a stream reference to the stream buffer.