[Boost-bugs] [Boost C++ Libraries] #7166: Phoenix unconditionally sets BOOST_PROTO_MAX_ARITY

Subject: [Boost-bugs] [Boost C++ Libraries] #7166: Phoenix unconditionally sets BOOST_PROTO_MAX_ARITY
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-24 12:42:33


#7166: Phoenix unconditionally sets BOOST_PROTO_MAX_ARITY
--------------------------------+-------------------------------------------
 Reporter: m.champlon@… | Owner: theller
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: phoenix
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 Hi,

 The following :
 {{{
 #define BOOST_PROTO_MAX_ARITY 20
 #include <boost/phoenix.hpp>
 }}}
 exhibits the following warning with msvc 2010 and boost 1.50 :
 {{{
 1>C:\dev\include\boost/phoenix/core/limits.hpp(19): warning C4005:
 'BOOST_PROTO_MAX_ARITY' : macro redefinition
 }}}

 This is rather inconvenient for the user of several libraries.
 I suggest to modify limits.hpp to change :
 {{{
 #if defined(BOOST_PHOENIX_LIMIT)
 #define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT
 }}}
 to :
 {{{
  #if defined(BOOST_PHOENIX_LIMIT)
 # if !defined( BOOST_PROTO_MAX_ARITY )
 # define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT
 # elif (BOOST_PROTO_MAX_ARITY < BOOST_PHOENIX_LIMIT)
 # error "BOOST_PROTO_MAX_ARITY is set too low"
 # endif
 }}}
 or see the attached patch.

 Thanks,
 MAT.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7166>
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