|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61843 - trunk/boost/spirit/home/karma/operator
From: hartmut.kaiser_at_[hidden]
Date: 2010-05-07 14:01:01
Author: hkaiser
Date: 2010-05-07 14:01:00 EDT (Fri, 07 May 2010)
New Revision: 61843
URL: http://svn.boost.org/trac/boost/changeset/61843
Log:
Spirit: fixing strict issue in Karma sequences
Text files modified:
trunk/boost/spirit/home/karma/operator/sequence.hpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/boost/spirit/home/karma/operator/sequence.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/sequence.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/sequence.hpp 2010-05-07 14:01:00 EDT (Fri, 07 May 2010)
@@ -239,6 +239,14 @@
// fail generating if sequences have not the same (logical) length
return !r && (!Strict::value ||
+ // This ignores container element count (which is not good),
+ // but allows valid attributes to succeed. This will lead to
+ // false positives (failing generators, even if they shouldn't)
+ // if the embedded component is restricting the number of
+ // container elements it consumes (i.e. repeat). This solution
+ // is not optimal but much better than letting _all_ repetitive
+ // components fail.
+ Pred1::value ||
detail::attribute_size<attr_type_>::value == detail::attr_size(attr_));
}
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