Article View: comp.std.c++
Article #1882Re: true/false literal std question
From: Jason Merrill
Date: Thu, 31 Aug 1995 21:41
Date: Thu, 31 Aug 1995 21:41
25 lines
1423 bytes
1423 bytes
The arguments for and against making the preprocessor recognize true and false seem to be: For: 1) Why not? 2) Uniformity Against: 1) Why bother? I have personally encountered a case where it would have been nice for the preprocessor to recognize true and false: Rogue Wave Tools.h++ uses a typedef RWBoolean and macros TRUE and FALSE for dealing with boolean values. I tried converting it over to using the bool type one day, by replacing 'int' with 'bool' in the typedef and '1' and '0' with 'true' and 'false'. This worked fine for actual code that used the TRUE and FALSE macros, but where they appeared in preprocessor directives I had to replace them with something else. Why should this be necessary? Jason --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<MATT.95Aug31144106@physics10.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!128.32.155.1!mattReferences:
<4167na$nv9@engnews2.Eng.Sun.COM> <9508311315.ZM8754@jabba>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt From: jason@cygnus.com (Jason Merrill) Newsgroups: comp.std.c++ Subject: Re: true/false literal std question Date: 31 Aug 1995 21:41:06 GMT Organization: Cygnus Support, Mountain View, CA Approved: matt@physics10.Berkeley.EDU (Matt Austern) Message-ID: <MATT.95Aug31144106@physics10.Berkeley.EDU> References: <4167na$nv9@engnews2.Eng.Sun.COM> <9508311315.ZM8754@jabba> NNTP-Posting-Host: physics10.berkeley.edu