Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51273 - in branches/release: . boost/proto
From: eric_at_[hidden]
Date: 2009-02-16 13:09:51


Author: eric_niebler
Date: 2009-02-16 13:09:51 EST (Mon, 16 Feb 2009)
New Revision: 51273
URL: http://svn.boost.org/trac/boost/changeset/51273

Log:
Merged revisions 51068 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r51068 | eric_niebler | 2009-02-06 17:09:57 -0800 (Fri, 06 Feb 2009) | 1 line
  
  eliminate extra dummy template parameter from proto::function and proto::nary_expr
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/proto/proto_fwd.hpp | 4 ++--
   branches/release/boost/proto/traits.hpp | 18 ++++++++++++------
   2 files changed, 14 insertions(+), 8 deletions(-)

Modified: branches/release/boost/proto/proto_fwd.hpp
==============================================================================
--- branches/release/boost/proto/proto_fwd.hpp (original)
+++ branches/release/boost/proto/proto_fwd.hpp 2009-02-16 13:09:51 EST (Mon, 16 Feb 2009)
@@ -478,7 +478,7 @@
         template<typename Tag, typename Left, typename Right>
         struct binary_expr;
 
- template<typename Tag, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void), typename Dummy = void>
+ template<typename Tag, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void)>
         struct nary_expr;
 
         // Specific expression metafunctions and
@@ -531,7 +531,7 @@
         template<typename T, typename U> struct member;
         template<typename T, typename U, typename V> struct if_else_;
 
- template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void), typename Dummy = void>
+ template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PROTO_MAX_ARITY, typename A, void)>
         struct function;
     }
 

Modified: branches/release/boost/proto/traits.hpp
==============================================================================
--- branches/release/boost/proto/traits.hpp (original)
+++ branches/release/boost/proto/traits.hpp 2009-02-16 13:09:51 EST (Mon, 16 Feb 2009)
@@ -2261,14 +2261,17 @@
             /// PrimitiveTransform that dispatches to the <tt>pass_through\<\></tt>
             /// transform.
             template<BOOST_PP_ENUM_PARAMS(N, typename A)>
- struct function<
+ struct function
+ #if N != BOOST_PROTO_MAX_ARITY
+ <
                 BOOST_PP_ENUM_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT), void
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
+ #endif
               : transform<
                     function<
                         BOOST_PP_ENUM_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT), void
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
                   , empty_base
>
@@ -2301,16 +2304,19 @@
             /// Use <tt>nary_expr\<_, vararg\<_\> \></tt> as a grammar element to match any
             /// n-ary expression; that is, any non-terminal.
             template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct nary_expr<
+ struct nary_expr
+ #if N != BOOST_PROTO_MAX_ARITY
+ <
                 Tag
                 BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT), void
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
+ #endif
               : transform<
                     nary_expr<
                         Tag
                         BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT), void
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N), void BOOST_PP_INTERCEPT)
>
                   , empty_base
>


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