|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73389 - sandbox/coerce/boost/coerce/detail
From: vexocide_at_[hidden]
Date: 2011-07-26 16:42:39
Author: vexocide
Date: 2011-07-26 16:42:38 EDT (Tue, 26 Jul 2011)
New Revision: 73389
URL: http://svn.boost.org/trac/boost/changeset/73389
Log:
Added the iterator type to the interface to allow use of {karma,qi}::{rule,grammar}
Text files modified:
sandbox/coerce/boost/coerce/detail/karma.hpp | 8 +++++---
sandbox/coerce/boost/coerce/detail/qi.hpp | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
Modified: sandbox/coerce/boost/coerce/detail/karma.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/detail/karma.hpp (original)
+++ sandbox/coerce/boost/coerce/detail/karma.hpp 2011-07-26 16:42:38 EDT (Tue, 26 Jul 2011)
@@ -32,10 +32,12 @@
typename traits::sequence<Target>::type iterator =
traits::sequence<Target>::back_inserter(target);
+ typename Tag::template generator<
+ typename traits::sequence<Target>::type, Target, Source
+ > generator(tag);
+
bool result = spirit::karma::generate(
- iterator,
- typename Tag::template generator<Target, Source>(tag),
- source);
+ iterator, generator, source);
return result;
}
Modified: sandbox/coerce/boost/coerce/detail/qi.hpp
==============================================================================
--- sandbox/coerce/boost/coerce/detail/qi.hpp (original)
+++ sandbox/coerce/boost/coerce/detail/qi.hpp 2011-07-26 16:42:38 EDT (Tue, 26 Jul 2011)
@@ -35,10 +35,12 @@
typename string_traits::const_iterator
begin = string_traits::begin(source), iterator = begin;
+ typename Tag::template parser<
+ typename string_traits::const_iterator, Target, Source
+ > parser(tag);
+
bool result = spirit::qi::parse(
- iterator, string_traits::end(source),
- typename Tag::template parser<Target, Source>(tag),
- target);
+ iterator, string_traits::end(source), parser, target);
if (static_cast<typename string_traits::size_type>(iterator - begin) != length) {
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