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