I do not quite understand what you are trying to do here. User code should not be inherited from the streams themselves, since the streams are intended to provide a generalized language conversion / installation of "streaming". If you are trying to use ostreamone that can write to a new buffer location (i.e. gzip stream), then you should usually inherit from basic_streambuf, which allows you to use existing iostream conversion tools, but allows you to redirect your input / output.
, iostream, , , IOStreams ++ . , ( ), , StackOverflow.
, , boost:: iostreams, , iostream .