Re: [Boost-bugs] [Boost C++ Libraries] #6131: #define foreach BOOST_FOREACH causes weird compile error in certain circumstances with boost 1.48

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-10-11 15:29:16


#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.50.0 | Severity: Problem
Resolution: fixed | Keywords:
-------------------------------+--------------------------------------------

Comment (by linasvepstas@…):

 Replying to [comment:18 eric_niebler]:
> Can someone try defining their `foreach` macro like this:
>
> {{{
> #include <boost/foreach.hpp>
>
> namespace boost
> {
> namespace BOOST_FOREACH = foreach;
> }
>
> #define foreach BOOST_FOREACH
> }}}
>
> Let me know how that works for you.

 Does not work for boost-1.49 I get:
 error: declaration of namespace ‘boost::BOOST_FOREACH’ conflicts with ...

 /usr/local/include/boost/foreach_fwd.hpp:56:1: error: previous declaration
 of namespace ‘boost::BOOST_FOREACH’ here

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6131#comment:19>
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:10 UTC