$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r55012 - in trunk/boost/spirit/home: qi/directive qi/operator support
From: joel_at_[hidden]
Date: 2009-07-18 00:26:53
Author: djowel
Date: 2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
New Revision: 55012
URL: http://svn.boost.org/trac/boost/changeset/55012
Log:
loop parsers fixes
Text files modified: 
   trunk/boost/spirit/home/qi/directive/repeat.hpp |     2 ++                                      
   trunk/boost/spirit/home/qi/operator/kleene.hpp  |     1 +                                       
   trunk/boost/spirit/home/qi/operator/list.hpp    |     3 +--                                     
   trunk/boost/spirit/home/qi/operator/plus.hpp    |     2 ++                                      
   trunk/boost/spirit/home/support/attributes.hpp  |     6 +++++-                                  
   5 files changed, 11 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/qi/directive/repeat.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/directive/repeat.hpp	(original)
+++ trunk/boost/spirit/home/qi/directive/repeat.hpp	2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
@@ -163,6 +163,7 @@
                         return false;
                     }
                     traits::push_back(attr, val);
+                    traits::clear(val);
                 }
             }
             // parse some more up to the maximum specified
@@ -171,6 +172,7 @@
                 if (!subject.parse(first, last, context, skipper, val))
                     break;
                 traits::push_back(attr, val);
+                traits::clear(val);
             }
             return true;
         }
Modified: trunk/boost/spirit/home/qi/operator/kleene.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/kleene.hpp	(original)
+++ trunk/boost/spirit/home/qi/operator/kleene.hpp	2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
@@ -65,6 +65,7 @@
             {
                 // push the parsed value into our attribute
                 traits::push_back(attr, val);
+                traits::clear(val);
             }
             return true;
         }
Modified: trunk/boost/spirit/home/qi/operator/list.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/list.hpp	(original)
+++ trunk/boost/spirit/home/qi/operator/list.hpp	2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
@@ -65,13 +65,12 @@
             if (left.parse(first, last, context, skipper, val))
             {
                 traits::push_back(attr, val);
-                traits::clear(val);
                 Iterator i = first;
                 while (right.parse(i, last, context, skipper, unused)
+                 && (traits::clear(val), true)
                  && left.parse(i, last, context, skipper, val))
                 {
                     traits::push_back(attr, val);
-                    traits::clear(val);
                     first = i;
                 }
                 return true;
Modified: trunk/boost/spirit/home/qi/operator/plus.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/operator/plus.hpp	(original)
+++ trunk/boost/spirit/home/qi/operator/plus.hpp	2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
@@ -63,9 +63,11 @@
             if (subject.parse(first, last, context, skipper, val))
             {
                 traits::push_back(attr, val);
+                traits::clear(val);
                 while (subject.parse(first, last, context, skipper, val))
                 {
                     traits::push_back(attr, val);
+                    traits::clear(val);
                 }
                 return true;
             }
Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp	(original)
+++ trunk/boost/spirit/home/support/attributes.hpp	2009-07-18 00:26:51 EDT (Sat, 18 Jul 2009)
@@ -432,7 +432,7 @@
     struct is_container;
 
     namespace detail
-    {
+    {      
         template <typename T>
         void clear_impl(T& val, mpl::false_)
         {
@@ -464,6 +464,10 @@
     {
         detail::clear_impl(val, typename is_container<T>::type());
     }
+    
+    void clear(unused_type)
+    {
+    }
 }}}
 
 #endif