|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-03-28 02:10:56
Author: eric_niebler
Date: 2008-03-28 02:10:55 EDT (Fri, 28 Mar 2008)
New Revision: 43906
URL: http://svn.boost.org/trac/boost/changeset/43906
Log:
proto support for BOOST_PROTO_MAX_FUNCTION_CALL_ARITY
Text files modified:
trunk/boost/xpressive/proto/expr.hpp | 4 ++--
trunk/boost/xpressive/proto/extends.hpp | 10 +++++-----
trunk/boost/xpressive/proto/proto_fwd.hpp | 8 ++++++++
3 files changed, 15 insertions(+), 7 deletions(-)
Modified: trunk/boost/xpressive/proto/expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/expr.hpp (original)
+++ trunk/boost/xpressive/proto/expr.hpp 2008-03-28 02:10:55 EDT (Fri, 28 Mar 2008)
@@ -111,7 +111,7 @@
template<typename Sig, typename This>
struct funop;
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), <boost/xpressive/proto/detail/funop.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY), <boost/xpressive/proto/detail/funop.hpp>))
#include BOOST_PP_ITERATE()
}
@@ -369,7 +369,7 @@
}
#endif
- #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), <boost/xpressive/proto/expr.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY), <boost/xpressive/proto/expr.hpp>))
#include BOOST_PP_ITERATE()
};
Modified: trunk/boost/xpressive/proto/extends.hpp
==============================================================================
--- trunk/boost/xpressive/proto/extends.hpp (original)
+++ trunk/boost/xpressive/proto/extends.hpp 2008-03-28 02:10:55 EDT (Fri, 28 Mar 2008)
@@ -285,7 +285,7 @@
BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
BOOST_PP_REPEAT_FROM_TO( \
0 \
- , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY) \
, BOOST_PROTO_DEFINE_FUN_OP_CONST \
, (Expr, Derived, Domain) \
) \
@@ -295,7 +295,7 @@
BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
BOOST_PP_REPEAT_FROM_TO( \
0 \
- , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY) \
, BOOST_PROTO_DEFINE_FUN_OP_NON_CONST \
, (Expr, Derived, Domain) \
) \
@@ -305,7 +305,7 @@
BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
BOOST_PP_REPEAT_FROM_TO( \
0 \
- , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY) \
, BOOST_PROTO_DEFINE_FUN_OP \
, (Expr, Derived, Domain) \
) \
@@ -380,7 +380,7 @@
/// INTERNAL ONLY
///
- #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY))
+ #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY))
#include BOOST_PP_LOCAL_ITERATE()
};
@@ -418,7 +418,7 @@
/// INTERNAL ONLY
///
- #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY))
+ #define BOOST_PP_LOCAL_LIMITS (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY))
#include BOOST_PP_LOCAL_ITERATE()
};
Modified: trunk/boost/xpressive/proto/proto_fwd.hpp
==============================================================================
--- trunk/boost/xpressive/proto/proto_fwd.hpp (original)
+++ trunk/boost/xpressive/proto/proto_fwd.hpp 2008-03-28 02:10:55 EDT (Fri, 28 Mar 2008)
@@ -31,6 +31,14 @@
# define BOOST_PROTO_MAX_LOGICAL_ARITY 8
#endif
+#ifndef BOOST_PROTO_MAX_FUNCTION_CALL_ARITY
+# define BOOST_PROTO_MAX_FUNCTION_CALL_ARITY BOOST_PROTO_MAX_ARITY
+#endif
+
+#if BOOST_PROTO_MAX_FUNCTION_CALL_ARITY > BOOST_PROTO_MAX_ARITY
+# error BOOST_PROTO_MAX_FUNCTION_CALL_ARITY cannot be larger than BOOST_PROTO_MAX_ARITY
+#endif
+
#if BOOST_WORKAROUND(__GNUC__, == 3) \
|| BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(306))
# define BOOST_PROTO_BROKEN_CONST_OVERLOADS
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