octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with stdbool.h redefining true/false even in C++


From: John W. Eaton
Subject: Re: Problem with stdbool.h redefining true/false even in C++
Date: Wed, 29 Aug 2012 13:36:27 -0400

On 29-Aug-2012, Paul Eggert wrote:

| On 08/29/2012 10:00 AM, John W. Eaton wrote:
| > Why define true, false, and bool to anything when using C++?
| 
| Maybe it's for '#ifdef bool' but to be honest I'm just doing what
| GCC does.  Perhaps you can ask the GCC developers why they do did
| it that way....
| 
| Anyway, I'd be surprised if Octave cares whether true, false, and bool
| are macros.  If it does, then it's broken on GNUish hosts anyway,
| right?  And if it doesn't, the gnulib patch should work as-is.

No, I don't think Octave currently has any checks like this.

For C++ code, I think '#ifdef bool' will be false.  So
'#define bool bool' switches the meaning.  Should that happen if
stdbool.h has been included?  I don't know.

This problem was a surprise to me because we don't include
stdbool.h directly in Octave C++ sources.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]