$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: hartmut.kaiser_at_[hidden]
Date: 2008-04-26 16:09:56
Author: hkaiser
Date: 2008-04-26 16:09:56 EDT (Sat, 26 Apr 2008)
New Revision: 44783
URL: http://svn.boost.org/trac/boost/changeset/44783
Log:
Added wrap_action for zero parameter semantic actions
Text files modified: 
   trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp |    17 +++++++++++++++++                       
   1 files changed, 17 insertions(+), 0 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp	(original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp	2008-04-26 16:09:56 EDT (Sat, 26 Apr 2008)
@@ -112,6 +112,23 @@
             using phoenix::arg_names::_1;
             return phoenix::bind(pf, f, _1);
         }
+
+        // semantic actions with 0 argument
+        template <typename F>
+        static void arg0_action(F* f, Attribute const&,
+            std::size_t, bool&, Context&)
+        {
+            f();
+        }
+
+        static FunctionType call(void(*f)())
+        {
+            void (*pf)(void(*)(), Attribute const&, std::size_t, 
+                bool&, Context&) = &arg0_action;
+
+            using phoenix::arg_names::_1;
+            return phoenix::bind(pf, f, _1);
+        }
     };
 
     // specialization allowing to skip wrapping for lexer types not supporting