delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/10/10:54:36

Date: Sat, 10 Feb 2001 17:53:42 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
Message-Id: <3791-Sat10Feb2001175341+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <002601c09366$c6247840$1dee883e@oemcomputer>
(djgpp AT argentum DOT freeserve DOT co DOT uk)
Subject: Re: namespace std and libstdc++ V3
References: <002601c09366$c6247840$1dee883e AT oemcomputer>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
> Date: Sat, 10 Feb 2001 13:38:06 -0000
> >
> > Is it possible first to outline what libstdc++ v3 does with its
> > wrappers?
> 
> The <c*> headers work by #including the native <*.h> headers into a
> namespace called _C_legacy like this:
> 
> namespace _C_legacy {
>   extern "C" {
> #     define _IN_C_LEGACY_
> #     undef __need_FILE
> #     pragma GCC system_header
> #     include_next <stdio.h>
>   }
> 
> They then import all the standard symbols into namespace std.

Thanks for the explanations.

I understand that if we use these wrappers, all the non-standard
functions are not in the std namespace, right?

If so, I think this is bad.  Why do they do it?  Does the C++ standard
require this?

> The change that I'm proposing would allow the first set of wrappers to
> be used, which is good for people who want maximum standard compliance
> and don't care about all the non-standard stuff being buried in
> namespace _C_legacy.

Is there any reasonable way to get the non-standard functions in std
as well?  Does the change you propose allow to do that?

- Raw text -


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