Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-05-09 10:48:52


Author: hkaiser
Date: 2008-05-09 10:48:51 EDT (Fri, 09 May 2008)
New Revision: 45251
URL: http://svn.boost.org/trac/boost/changeset/45251

Log:
Spirit: Fixed gcc compilation problems.
Text files modified:
   trunk/boost/spirit/home/karma/action/action.hpp | 4 +-
   trunk/boost/spirit/home/qi/action/action.hpp | 4 ++
   trunk/boost/spirit/home/support/detail/action_dispatch.hpp | 44 ++++++++++++++++++++--------------------
   3 files changed, 27 insertions(+), 25 deletions(-)

Modified: trunk/boost/spirit/home/karma/action/action.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/action/action.hpp (original)
+++ trunk/boost/spirit/home/karma/action/action.hpp 2008-05-09 10:48:51 EDT (Fri, 09 May 2008)
@@ -68,8 +68,8 @@
             // fail parsing.
             // call the function, passing the attribute, the context.
             // The client can return false to fail parsing.
- bool pass = spirit::detail::action_dispatch<is_sequence>(
- spirit::right(component), p, ctx);
+ bool pass = spirit::detail::action_dispatch(
+ spirit::right(component), p, ctx, is_sequence());
 
             return pass &&
                 director::generate(spirit::left(component), sink, ctx, d, p);

Modified: trunk/boost/spirit/home/qi/action/action.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/action/action.hpp (original)
+++ trunk/boost/spirit/home/qi/action/action.hpp 2008-05-09 10:48:51 EDT (Fri, 09 May 2008)
@@ -12,6 +12,7 @@
 #include <boost/spirit/home/support/attribute_of.hpp>
 #include <boost/spirit/home/support/detail/action_dispatch.hpp>
 #include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
 #include <boost/mpl/identity.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -40,7 +41,8 @@
             // before calling detail::action_dispatch whereby
             // disallowing mutability of the attribute in semantic
             // actions.
- return spirit::detail::action_dispatch<mpl::true_>(f, attr, context);
+ return spirit::detail::action_dispatch(f, attr, context,
+ mpl::true_());
         }
 
         template <

Modified: trunk/boost/spirit/home/support/detail/action_dispatch.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/action_dispatch.hpp (original)
+++ trunk/boost/spirit/home/support/detail/action_dispatch.hpp 2008-05-09 10:48:51 EDT (Fri, 09 May 2008)
@@ -15,8 +15,8 @@
 namespace boost { namespace spirit { namespace detail
 {
     // general handler for everything not explicitly specialized below
- template <typename Pass, typename F, typename Attribute, typename Context>
- bool action_dispatch(F const& f, Attribute& attr, Context& context)
+ template <typename F, typename Attribute, typename Context, typename Pass>
+ bool action_dispatch(F const& f, Attribute& attr, Context& context, Pass&)
     {
         bool pass = true;
         f(attr, context, pass);
@@ -29,7 +29,7 @@
     // wrap any non-fusion sequence into a fusion sequence (done by pass_value)
     // and pass through any fusion sequence.
     template <typename Eval, typename Attribute, typename Context>
- bool action_dispatch_impl(phoenix::actor<Eval> const& f
+ bool action_dispatch(phoenix::actor<Eval> const& f
       , Attribute& attr, Context& context, mpl::true_)
     {
         bool pass = true;
@@ -42,7 +42,7 @@
     // has to be treated as being a single value in any case (even if it
     // actually already is a fusion sequence on its own).
     template <typename Eval, typename Attribute, typename Context>
- bool action_dispatch_impl(phoenix::actor<Eval> const& f
+ bool action_dispatch(phoenix::actor<Eval> const& f
       , Attribute& attr, Context& context, mpl::false_)
     {
         bool pass = true;
@@ -50,47 +50,47 @@
         return pass;
     }
 
- template <typename IsSequence
- , typename Eval, typename Attribute, typename Context>
- bool action_dispatch(phoenix::actor<Eval> const& f
- , Attribute& attr, Context& context)
- {
- return action_dispatch_impl(f, attr, context, IsSequence());
- }
+// template <typename Eval, typename Attribute, typename Context,
+// typename IsSequence>
+// bool action_dispatch(phoenix::actor<Eval> const& f
+// , Attribute& attr, Context& context, IsSe&)
+// {
+// return action_dispatch_impl(f, attr, context, IsSequence());
+// }
 
     // specializations for plain function pointers taking a different number of
     // arguments
- template <typename Pass, typename RT, typename A0, typename A1, typename A2
- , typename Attribute, typename Context>
+ template <typename RT, typename A0, typename A1, typename A2
+ , typename Attribute, typename Context, typename Pass>
     bool action_dispatch(RT(*f)(A0, A1, A2)
- , Attribute& attr, Context& context)
+ , Attribute& attr, Context& context, Pass&)
     {
         bool pass = true;
         f(attr, context, pass);
         return pass;
     }
 
- template <typename Pass, typename RT, typename A0, typename A1
- , typename Attribute, typename Context>
+ template <typename RT, typename A0, typename A1
+ , typename Attribute, typename Context, typename Pass>
     bool action_dispatch(RT(*f)(A0, A1)
- , Attribute& attr, Context& context)
+ , Attribute& attr, Context& context, Pass&)
     {
         f(attr, context);
         return true;
     }
 
- template <typename Pass, typename RT, typename A0
- , typename Attribute, typename Context>
+ template <typename RT, typename A0
+ , typename Attribute, typename Context, typename Pass>
     bool action_dispatch(RT(*f)(A0)
- , Attribute& attr, Context&)
+ , Attribute& attr, Context&, Pass&)
     {
         f(attr);
         return true;
     }
 
- template <typename Pass, typename RT, typename Attribute, typename Context>
+ template <typename RT, typename Attribute, typename Context, typename Pass>
     bool action_dispatch(RT(*f)()
- , Attribute&, Context&)
+ , Attribute&, Context&, Pass&)
     {
         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