Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67133 - trunk/boost/spirit/home/karma/detail
From: hartmut.kaiser_at_[hidden]
Date: 2010-12-09 11:05:40


Author: hkaiser
Date: 2010-12-09 11:05:36 EST (Thu, 09 Dec 2010)
New Revision: 67133
URL: http://svn.boost.org/trac/boost/changeset/67133

Log:
Spirit: reverting a change causing problems on closer examination
Text files modified:
   trunk/boost/spirit/home/karma/detail/pass_container.hpp | 19 ++-----------------
   1 files changed, 2 insertions(+), 17 deletions(-)

Modified: trunk/boost/spirit/home/karma/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/pass_container.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/pass_container.hpp 2010-12-09 11:05:36 EST (Thu, 09 Dec 2010)
@@ -91,17 +91,10 @@
         // This is for the case when the current element expects an attribute
         // which is a container itself, this element will get the rest of the
         // attribute container.
- // For some attributes (like utree) we assume, that the generator ate
- // at least one element of the sequence. This isn't pretty, but
- // generators are either assumed to consume all remaining attributes or
- // to consume exactly one.
         template <typename Component>
         bool dispatch_attribute_element(Component const& component, mpl::true_) const
         {
- bool result = f(component, make_iterator_range(iter, end));
- if (iter != end)
- ++iter;
- return result;
+ return f(component, make_iterator_range(iter, end));
         }
 
         // This handles the distinction between elements in a sequence expecting
@@ -149,18 +142,10 @@
         // This handles the case where the attribute of the component is
         // an STL container *and* its value_type is convertible to the
         // target attribute's (Attr) value_type.
- //
- // For some attributes (like utree) we assume, that the generator ate
- // at least one element of the sequence. This isn't pretty, but
- // generators are either assumed to consume all remaining attributes or
- // to consume exactly one.
         template <typename Component>
         bool dispatch_main(Component const& component, mpl::true_) const
         {
- bool result = f(component, make_iterator_range(iter, end));
- if (iter != end)
- ++iter;
- return result;
+ return f(component, make_iterator_range(iter, end));
         }
 
         // Dispatches to dispatch_main depending on the attribute type


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