This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


On Thu, Jan 25, 2001 at 07:50:43PM -0800, Mark Mitchell wrote:
> 
> 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

Are you referring to the synopsis in [27.3], or somewhere else?  I had looked
at that section earlier in the discussion tonight...  While the synopsis
shows cout as being declared as an ostream, I think we would be permitted
to declare cout as a class derived from ostream, under the as-if rule.

I can't think of any reason to /do/ so off the top of my head; we don't
need and can't use the older *_withassign stuff, as an example.


> 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.

Setting the iostreams-as-references and evil-things-required-for-AIX issues
aside for a moment:

I thought one of the goals of 3.0 was to provide for this kind of
compatibility?  A final change for all time, or at least for the next
several years?

If a future standard points to, say, cout being subclassed from ostream,
then that would probably be reason enough to break binary compat.  (Such a
standard would probably contain enough changes that we would want to do
so anyhow.)


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]