STL with gcc3

Phil Edwards phil@jaj.com
Wed Jul 17 14:15:00 GMT 2002


On Wed, Jul 17, 2002 at 11:39:53AM -0700, Matt Austern wrote:
> On Wednesday, July 17, 2002, at 11:35 AM, Ji Li wrote:
> >
> > 	I believe there must be a way to make gcc-3.0.4 backward
> > compatable but just could find it. Would you please point the way for 
> > me?
> 
> You really don't want to do that.  The standard says that everything
> in the Standard Library is supposed to be in namespace std.  Other
> compilers have conformed to the standard for years.  You should
> change your code, for portability if for no other reason.

Matt is correct; your code is not C++.  To aid in making the transition, gcc
3.x lets you include <backward/iostream.h>.  But there is no comparable header
for <string>, since there was never really a pre-standard string class.  So
you'll have to edit your code anyway; may as well fix the I/O names as well.


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 Gcc-help mailing list