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:53:54


#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@…):

 To be completely clear: the following seems to work for multiple versions
 of boost (1.46, 1.48, 1.49, 1.50) and for multiple OS'es (MacOS, arch
 linux, multiple different ubuntu, RHEL4, and a cluster running old
 CentOS):

 {{{
  #include <boost/foreach.hpp>
  #include <boost/version.hpp>

  namespace boost {

  #if BOOST_VERSION != 104900
  namespace BOOST_FOREACH = foreach;
  #endif

  } // namespace boost

  #define foreach BOOST_FOREACH
 }}}

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