cin/cout as reference objects [Re: AIX I/O failures]

Mark Mitchell mark@codesourcery.com
Thu Jan 25 19:44:00 GMT 2001


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

    Richard> Depends on what that sizeof is used for.  Can you think
    Richard> of any legitimate uses?

That's a good question.  

I see what you're suggesting -- namely that everything *except* sizeof
(and a few other things, like `typeid') will just work if you
subclass, because the initial fields will all line up.

I don't know if the standard says anything about what type `cout'
has... checks... yes it must have type `ostream', so it must be the
case that `sizeof (cout) == sizeof (ostream)' is true, and similarly
for typeid. 

But, I'm not sure how that matters.  

I'm a little out of my depth.  I fully understand your suggestion to
provide for binary compatibility going forward.  However, V3's not
mature enough for that to be realistic; other changes are going to be
necessary too.  I'll back out, and let the people who fully know the
standards requirements and such sort it out...

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Libstdc++ mailing list