Boost Users :
Subject: Re: [Boost-users] Boost-users Digest, Vol 2003, Issue 6
From: Tron Thomas (tron.thomas_at_[hidden])
Date: 2009-05-22 18:01:46
> Date: Fri, 22 May 2009 22:42:05 +0100 From: "Pete Bartlett"
> <pete_at_[hidden]> Subject: Re: [Boost-users] Including Xutil.h on
> Fedora breaks BOOST_FOREACH To: <boost-users_at_[hidden]>
> Message-ID: <4CBFD915E6B84833BC9CE588386CDD04_at_P2> Content-Type:
> text/plain; charset="us-ascii" Tron Thomas wrote:
>> >#include <X11/Xutil.h>
> A quick search on Google Codesearch shows that Xutil.h includes Xlib.h which
> has the following
> #define Bool int
> #define Status int
> #define True 1
> #define False 0
> (around line 112 in the version I am looking at).
> This breaks Boost.ForEach's (legitimate) attempt to use "Bool" as the name
> for a template type. How to fix? Some possibilities
> a) Stop using libraries that employ such bad practices, or
> b) Wrap the include in your own header that tidies up after X11 with some
> #undefs, or
> c) include X11 after Boost ?!
> I doubt Boost.ForEach would be the only library the X11 include would foul
Thanks Pete. I was able to get the code to compile now.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net