delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/13/06:46:10

Date: Wed, 13 Dec 2000 13:43:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Stephen Silver <djgpp AT argentum DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: ctype.h in C++
In-Reply-To: <000901c0647e$8331a6a0$5fdc883e@oemcomputer>
Message-ID: <Pine.SUN.3.91.1001213134247.11254V-100000@is>
MIME-Version: 1.0
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

On Tue, 12 Dec 2000, Stephen Silver wrote:

Thank you for your report.

> There is a problem with the ctype.h header when used in C++: all 13
> standard functions are defined as macros, which is permissible in C, but
> not in C++.
> In particular, the compiler chokes on expressions such as
> std::tolower('A') because a namespace qualifier cannot be applied to a
> macro.

Then why doesn't the C++ compiler disable the macros in its <ctype>
(or is it <cctype>?) header?

Is the above the only problem with those macros, or are there
additional circumstances where macros don't work.  (You seem to be
saying that C++ disallows ctype macros everywhere.)

Also, do the current versions of GCC even support the std namespace
like that?

I wonder how come we never heard such complaints until now?  Andris,
could you please shed some light on this?

- Raw text -


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