Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49089 - in trunk/boost: proto xpressive/proto
From: eric_at_[hidden]
Date: 2008-10-01 12:35:58


Author: eric_niebler
Date: 2008-10-01 12:35:58 EDT (Wed, 01 Oct 2008)
New Revision: 49089
URL: http://svn.boost.org/trac/boost/changeset/49089

Log:
accept patch from Daniel James to fix gcc-4.4 preprocessor problem in proto, fixes #2377
Text files modified:
   trunk/boost/proto/expr.hpp | 6 +++++-
   trunk/boost/xpressive/proto/expr.hpp | 6 +++++-
   2 files changed, 10 insertions(+), 2 deletions(-)

Modified: trunk/boost/proto/expr.hpp
==============================================================================
--- trunk/boost/proto/expr.hpp (original)
+++ trunk/boost/proto/expr.hpp 2008-10-01 12:35:58 EDT (Wed, 01 Oct 2008)
@@ -146,7 +146,10 @@
 
     #endif // BOOST_PROTO_EXPR_HPP_EAN_04_01_2005
 
-#elif BOOST_PP_ITERATION_DEPTH() == 1
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
 
     #define ARG_COUNT BOOST_PP_MAX(1, BOOST_PP_ITERATION())
     #define IS_TERMINAL 0 == BOOST_PP_ITERATION()
@@ -477,4 +480,5 @@
 
     #undef N
 
+#endif // BOOST_PP_ITERATION_DEPTH()
 #endif

Modified: trunk/boost/xpressive/proto/expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/expr.hpp (original)
+++ trunk/boost/xpressive/proto/expr.hpp 2008-10-01 12:35:58 EDT (Wed, 01 Oct 2008)
@@ -134,7 +134,10 @@
 
     #endif // BOOST_PROTO_EXPR_HPP_EAN_04_01_2005
 
-#elif BOOST_PP_ITERATION_DEPTH() == 1
+// For gcc 4.4 compatability, we must include the
+// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
+#else // BOOST_PP_IS_ITERATING
+#if BOOST_PP_ITERATION_DEPTH() == 1
 
     #define ARG_COUNT BOOST_PP_MAX(1, BOOST_PP_ITERATION())
     #define IS_TERMINAL 0 == BOOST_PP_ITERATION()
@@ -404,4 +407,5 @@
 
     #undef N
 
+#endif // BOOST_PP_ITERATION_DEPTH()
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk