Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6131: #define foreach BOOST_FOREACH causes weird compile error in certain circumstances with boost 1.48
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-05 22:07:13
#6131: #define foreach BOOST_FOREACH causes weird compile error in certain
circumstances with boost 1.48
-------------------------------+--------------------------------------------
Reporter: loonycyborg | Owner: eric_niebler
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: foreach
Version: Boost 1.49.0 | Severity: Problem
Resolution: fixed | Keywords:
-------------------------------+--------------------------------------------
Comment (by anonymous):
In 1.49 under Visual Studio 2008, I am now getting this error whenever I
DON'T include <boost/foreach.hpp> until AFTER I #define foreach
BOOST_FOREACH:
'boost::BOOST_FOREACH::is lightweight proxy' : class template has already
been defined
foreach_fwd.hpp(62) : see declaration of
'boost::BOOST_FOREACH::is_lightweight_proxy'
Simple test that fails:
#define foreach BOOST_FOREACH
#include <boost/foreach.hpp>
It works fine in the other order, i.e., the include before the #define.
This never used to be a problem.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6131#comment:9> 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:09 UTC