Subject: [Boost-bugs] [Boost C++ Libraries] #3000: Boost.foreach header conflicts with Python headers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-07 07:51:55
#3000: Boost.foreach header conflicts with Python headers
--------------------------------------------------+-------------------------
Reporter: Alexander Stukowski <alexstu_at_[hidden]> | Owner: eric_niebler
Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: foreach
Version: Boost Development Trunk | Severity: Problem
Keywords: |
--------------------------------------------------+-------------------------
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.
This is probably because the Python headers #define the word "Bool" used
in that line.
Changing the code in line 221 and 222 of foreach.hpp to
template<typename Bool1>
inline boost::mpl::not_<Bool1> *not_(Bool1 *) { return 0; }
avoids the problem.
I used GCC 4.3.2 on Ubuntu Linux; Python 2.5 and Python 2.6.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3000> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC