[Numpy-discussion] Release of scipy core beta will happen next week.
Gerard Vermeulen
gerard.vermeulen at grenoble.cnrs.fr
Mon Sep 26 08:53:34 EDT 2005
On Sun, 25 Sep 2005 19:59:23 -0700
Robert Kern <rkern at ucsd.edu> wrote:
> > typedef unsigned char bool;
> >
> > in arrayobject.h, because bool is a predefined type in C++.
> >
> > I see the offending line is still in SVN (did not try to build it though).
>
> Will this do the trick?
>
> #ifndef __cplusplus
> typedef unsigned char bool;
> #define false 0
> #define true 1
> #endif /* __cplusplus */
>
It works for my g++, but it may not be a general solution.
See footnote 15 under item 2 of section 5.3.3 of
http://www.open-std.org/jtc1/sc22/open/n2356/
(ISO C++ draft) saying that sizeof(bool) is
not required to be 1.
Gerard
More information about the NumPy-Discussion
mailing list