www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/05/11:36:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199905051533.KAA16816@modi.xraylith.wisc.edu>
X-Authentication-Warning: modi.xraylith.wisc.edu: localhost.xraylith.wisc.edu [127.0.0.1] didn't use HELO protocol
To: Paul Thiessen <paul AT grserv DOT med DOT jhmi DOT edu>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: GNU and std namespaces
In-reply-to: Your message of "Wed, 05 May 1999 07:50:57 EDT."
<Pine DOT SGI DOT 4 DOT 05 DOT 9905050744180 DOT 57239-100000 AT turandot DOT med DOT jhmi DOT edu>
Date: Wed, 05 May 1999 10:33:21 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Paul Thiessen <paul AT grserv DOT med DOT jhmi DOT edu> writes:
> Just a general curiosity question. I've been reading the C++ standard,
> which talks about the std namespace that's supposed to be used with
> standard library stuff with the new headers like <iostream>. But when I
> look at the headers that come with mingw32/egcs, I see that <iostream>
> just contains "#include <iostream.h>", and that <iostream.h> doesn't seem
> to have any mention of std namespace. Has this just not yet been
> implemented in GNU, or is there some more subtle mechanism used that's not
> apparent from a quick glance at the header files?

EGCS lacks a standard compliant C++ library implementation, so the
namespacing isn't strictly correct. However, EGCS will accept std::
(it's an internal hack, but at least that makes maintaining code 
across compilers much easier).

  #include <string>
  using namespace std;
  string s ("hello world");

or,

  #include <string>
  std::string s ("hello world");

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019