|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58720 - in trunk/boost/spirit/home/support/iterators: . detail
From: hartmut.kaiser_at_[hidden]
Date: 2010-01-05 12:50:04
Author: hkaiser
Date: 2010-01-05 12:50:03 EST (Tue, 05 Jan 2010)
New Revision: 58720
URL: http://svn.boost.org/trac/boost/changeset/58720
Log:
Spirit: more multi_pass fixes
Text files modified:
trunk/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp | 2 +-
trunk/boost/spirit/home/support/iterators/multi_pass.hpp | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
Modified: trunk/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp 2010-01-05 12:50:03 EST (Tue, 05 Jan 2010)
@@ -58,7 +58,7 @@
// test, whether we reached the end of the underlying stream
template <typename MultiPass>
- static bool input_at_eof(MultiPass const&)
+ static bool input_at_eof(MultiPass const& mp)
{
return mp.shared()->curtok == 0;
}
Modified: trunk/boost/spirit/home/support/iterators/multi_pass.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/multi_pass.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/multi_pass.hpp 2010-01-05 12:50:03 EST (Tue, 05 Jan 2010)
@@ -203,14 +203,28 @@
{
return multi_pass<T, Policies>(i);
}
+ template <typename Policies, typename T>
+ inline multi_pass<T, Policies>
+ make_multi_pass(T const& i)
+ {
+ return multi_pass<T, Policies>(i);
+ }
+ ///////////////////////////////////////////////////////////////////////////
template <typename T>
inline multi_pass<T>
make_default_multi_pass(T& i)
{
return multi_pass<T>(i);
}
+ template <typename T>
+ inline multi_pass<T>
+ make_default_multi_pass(T const& i)
+ {
+ return multi_pass<T>(i);
+ }
+ ///////////////////////////////////////////////////////////////////////////
template <typename T, typename Policies>
inline void
swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y)
@@ -218,6 +232,7 @@
x.swap(y);
}
+ ///////////////////////////////////////////////////////////////////////////
// define special functions allowing to integrate any multi_pass iterator
// with expectation points
namespace traits
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