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: breaking compatibility


I'm sure we can probably wave the restriction on including standard headers
for the case of <iosfwd>.  The real concern is standard headers that include
'new' in inline functions somewhere... (which screws up our memory
tracker...)

The real concern is the work that switching to the extentionless headers
would require...

-Loren

-----Original Message-----
From: libstdc++-owner@gcc.gnu.org [mailto:libstdc++-owner@gcc.gnu.org]On
Behalf Of Nathan Myers
Sent: Thursday, April 19, 2001 1:33 PM
To: libstdc++@gcc.gnu.org
Subject: Re: breaking compatibility

This alternative was carefully considered during standardization.
If there were any way it, or something like it, could have been
approved instead, to preserve code with forward declarations, it
would be in the standard now.  <iosfwd> was the best that could
be done.

The standard doesn't say anything about <iostream.h> or <istream.h>,
so those could legally have a struct istream; but then they would be
incompatible with the <iostream> and <istream> headers -- you would
have to convert your programs and libraries all at once, without mixing.

Probably you will have to use #ifdefs, and relax the restriction on
including standard headers for the case of <iosfwd>.

Nathan Myers
ncm at cantrip dot org


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