www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/13/07:03:44

Message-ID: <001001c095b4$facd8a00$03df883e@oemcomputer>
From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
To: "DJGPP Workers" <djgpp-workers AT delorie DOT com>
Subject: Re: namespace std and libstdc++ V3
Date: Tue, 13 Feb 2001 12:03:26 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii  wrote:

> On Mon, 12 Feb 2001, Stephen Silver wrote:
>
> > The c_std option doesn't put the standard functions (or anything else)
> > in namespace std if the user includes <*.h> instead of <c*>.  It was
> > this sort of incorrect behaviour that I was trying to avoid.
>
> Can we have the cake and eat it, too?  That is, can we leave the <c*> 
> headers up to libstdc++ (after all, they are theirs to begin with) and 
> fix only the <*.h> headers which come with DJGPP?

The "c_std" option is incompatible with any .h fix I can think of.
If we want the .h headers to work correctly, we either have to use
the "c" option and fix the .h headers as I have been doing, or we
have to use the "c_shadow" option and fix the .h headers so that
they treat non-standard functions sensibly.  The latter option gives
the best standard compliance, but is also more problematic.

> Is that what your latest suggestion based on looking into libstdc++
> was trying to do?

No, not really.  That suggestion was designed to allow the two
above-mentioned choices to co-exist to some extent.  That is, the
.h headers would work with either the "c" or the "c_shadow" options
(although without necessarily attempting to fix the problems that
"c_shadow" introduces).

> > If the ultimate aim is to use the c_shadow headers, then there is
> > not much point is using my namespace std patches
>
> Please explain why.  Are these two goals somehow incompatible, even
> if we leave the <c*> headers alone?

They require putting different sets of 'using' declarations at the end
of the DJGPP headers.  They are not actually incompatible, because the
choice can be made according to whether _IN_C_LEGACY_ is defined or not.
But having two sets of 'using' declarations at the end of each header
seems like a lot of clutter if one of these sets is not going to be
used in the long run.

Stephen

- Raw text -


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