Recent strstream regression: reversion needed?

Phil Edwards phil@jaj.com
Wed Jun 5 23:52:00 GMT 2002


On Wed, Jun 05, 2002 at 01:25:04AM -0700, Benjamin Kosnik wrote:
> I'm convinced that removing the strstream code and just typedefing
> strstream to stringstream<char>, istrstream to istringstream<char>,
> ostrstream to ostringstream<char>, etc,  would work much better than the
> present solution. I think it was discussed but I'm not quite sure why
> the current solution is in place instead.

We can probably use private inheritence (the famous "is-implemented-in-terms-of"
relation) to do it, e.g., "class strstream : private stringstream<char>"
but I don't think we can get away with a typedef.

I say this only because I've seen calls to a "freeze" strstream member
function.  (I don't know what that function does, and don't really care,
because I've never used strstreams and think they should die as soon
as possible.)


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list