|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85046 - in branches/release: . boost boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/karma/directive libs libs/spirit libs/spirit/test libs/spirit/test/karma
From: hartmut.kaiser_at_[hidden]
Date: 2013-07-15 13:24:24
Author: hkaiser
Date: 2013-07-15 13:24:24 EDT (Mon, 15 Jul 2013)
New Revision: 85046
URL: http://svn.boost.org/trac/boost/changeset/85046
Log:
Spirit: Merging from trunk
Properties modified:
branches/release/ (props changed)
branches/release/boost/ (props changed)
branches/release/boost/spirit/ (props changed)
branches/release/boost/spirit/home/ (props changed)
branches/release/boost/spirit/home/karma/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/spirit/ (props changed)
branches/release/libs/spirit/test/ (props changed)
Text files modified:
branches/release/boost/spirit/home/karma/directive/omit.hpp | 2 +-
branches/release/libs/spirit/test/karma/omit.cpp | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
Modified: branches/release/boost/spirit/home/karma/directive/omit.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/directive/omit.hpp Mon Jul 15 09:55:21 2013 (r85045)
+++ branches/release/boost/spirit/home/karma/directive/omit.hpp 2013-07-15 13:24:24 EDT (Mon, 15 Jul 2013) (r85046)
@@ -77,7 +77,7 @@
if (Execute) {
// wrap the given output iterator to avoid output
detail::disable_output<OutputIterator> disable(sink);
- subject.generate(sink, ctx, d, attr);
+ return subject.generate(sink, ctx, d, attr);
}
return true;
}
Modified: branches/release/libs/spirit/test/karma/omit.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/omit.cpp Mon Jul 15 09:55:21 2013 (r85045)
+++ branches/release/libs/spirit/test/karma/omit.cpp 2013-07-15 13:24:24 EDT (Mon, 15 Jul 2013) (r85046)
@@ -47,6 +47,21 @@
BOOST_TEST(test("15", r, a));
}
+ // even if omit[] never fails, it has to honor the result of the
+ // embedded generator
+ {
+ typedef std::pair<double, double> attribute_type;
+ rule<outiter_type, attribute_type()> r;
+
+ r %= omit[double_(1.0) << double_] | "42";
+
+ attribute_type p1 (1.0, 2.0);
+ BOOST_TEST(test("", r, p1));
+
+ attribute_type p2 (10.0, 2.0);
+ BOOST_TEST(test("42", r, p2));
+ }
+
// skip[] is not supposed to execute the embedded generator
{
using boost::spirit::karma::double_;
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