Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56583 - trunk/boost/spirit/home/qi/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-04 18:22:26


Author: hkaiser
Date: 2009-10-04 18:22:25 EDT (Sun, 04 Oct 2009)
New Revision: 56583
URL: http://svn.boost.org/trac/boost/changeset/56583

Log:
Spirit: using customization point (assign_to) for attribute assignment
Text files modified:
   trunk/boost/spirit/home/qi/detail/alternative_function.hpp | 5 +++--
   1 files changed, 3 insertions(+), 2 deletions(-)

Modified: trunk/boost/spirit/home/qi/detail/alternative_function.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/alternative_function.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/alternative_function.hpp 2009-10-04 18:22:25 EDT (Sun, 04 Oct 2009)
@@ -12,6 +12,7 @@
 #endif
 
 #include <boost/spirit/home/qi/domain.hpp>
+#include <boost/spirit/home/qi/detail/assign_to.hpp>
 #include <boost/spirit/home/support/unused.hpp>
 #include <boost/spirit/home/support/attributes.hpp>
 #include <boost/variant.hpp>
@@ -37,7 +38,7 @@
             // if Attribute is not a variant, then pass it as-is
             return component.parse(first, last, context, skipper, attr);
         }
-
+
         template <typename Component, typename T>
         bool operator()(Component const& component, mpl::identity<T>) const
         {
@@ -45,7 +46,7 @@
             T val;
             if (component.parse(first, last, context, skipper, val))
             {
- attr = val;
+ traits::assign_to(val, attr);
                 return true;
             }
             return false;


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