Boost C++ Libraries: Ticket #3000: Boost.foreach header conflicts with Python headers https://svn.boost.org/trac10/ticket/3000 <p> When using the Python and Boost.Python headers in a program before including the Boost.foreach header, I get a weired compiler error in line 221 of boost/foreach.hpp. </p> <p> This is probably because the Python headers #define the word "Bool" used in that line. </p> <p> Changing the code in line 221 and 222 of foreach.hpp to </p> <p> template&lt;typename Bool1&gt; </p> <p> inline boost::mpl::not_&lt;Bool1&gt; *not_(Bool1 *) { return 0; } </p> <p> avoids the problem. </p> <p> I used GCC 4.3.2 on Ubuntu Linux; Python 2.5 and Python 2.6. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3000 Trac 1.4.3 Eric Niebler Thu, 07 May 2009 17:16:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3000#comment:1 https://svn.boost.org/trac10/ticket/3000#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/52836" title="work around conflict with python headers, fixes #3000">[52836]</a>) work around conflict with python headers, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3000" title="#3000: Bugs: Boost.foreach header conflicts with Python headers (closed: fixed)">#3000</a> </p> Ticket