Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-07-11 15:24:45


Author: hkaiser
Date: 2008-07-11 15:24:42 EDT (Fri, 11 Jul 2008)
New Revision: 47325
URL: http://svn.boost.org/trac/boost/changeset/47325

Log:
Spirit: Fixing rest of the regressions in Karma
Text files modified:
   branches/release/boost/spirit/home/support/detail/action_dispatch.hpp | 31 +++++++++++++++++++++----------
   1 files changed, 21 insertions(+), 10 deletions(-)

Modified: branches/release/boost/spirit/home/support/detail/action_dispatch.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/action_dispatch.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/action_dispatch.hpp 2008-07-11 15:24:42 EDT (Fri, 11 Jul 2008)
@@ -15,8 +15,18 @@
 namespace boost { namespace spirit { namespace detail
 {
     // general handler for everything not explicitly specialized below
- template <typename F, typename Attribute, typename Context, typename Pass>
- bool action_dispatch(F const& f, Attribute& attr, Context& context, Pass)
+ template <typename F, typename Attribute, typename Context>
+ bool action_dispatch(F const& f, Attribute& attr, Context& context
+ , mpl::true_)
+ {
+ bool pass = true;
+ f(attr, context, pass);
+ return pass;
+ }
+
+ template <typename F, typename Attribute, typename Context>
+ bool action_dispatch(F const& f, Attribute& attr, Context& context
+ , mpl::false_)
     {
         bool pass = true;
         f(attr, context, pass);
@@ -53,9 +63,9 @@
     // specializations for plain function pointers taking a different number of
     // arguments
     template <typename RT, typename A0, typename A1, typename A2
- , typename Attribute, typename Context, typename Pass>
+ , typename Attribute, typename Context, typename IsSequence>
     bool action_dispatch(RT(*f)(A0, A1, A2)
- , Attribute& attr, Context& context, Pass)
+ , Attribute& attr, Context& context, IsSequence)
     {
         bool pass = true;
         f(attr, context, pass);
@@ -63,26 +73,27 @@
     }
 
     template <typename RT, typename A0, typename A1
- , typename Attribute, typename Context, typename Pass>
+ , typename Attribute, typename Context, typename IsSequence>
     bool action_dispatch(RT(*f)(A0, A1)
- , Attribute& attr, Context& context, Pass)
+ , Attribute& attr, Context& context, IsSequence)
     {
         f(attr, context);
         return true;
     }
 
     template <typename RT, typename A0
- , typename Attribute, typename Context, typename Pass>
+ , typename Attribute, typename Context, typename IsSequence>
     bool action_dispatch(RT(*f)(A0)
- , Attribute& attr, Context&, Pass)
+ , Attribute& attr, Context&, IsSequence)
     {
         f(attr);
         return true;
     }
 
- template <typename RT, typename Attribute, typename Context, typename Pass>
+ template <typename RT
+ , typename Attribute, typename Context, typename IsSequence>
     bool action_dispatch(RT(*f)()
- , Attribute&, Context&, Pass)
+ , Attribute&, Context&, IsSequence)
     {
         f();
         return true;


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