|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57402 - trunk/boost/spirit/home/qi/string
From: joel_at_[hidden]
Date: 2009-11-05 02:34:41
Author: djowel
Date: 2009-11-05 02:34:40 EST (Thu, 05 Nov 2009)
New Revision: 57402
URL: http://svn.boost.org/trac/boost/changeset/57402
Log:
symbols fix from Daniel James
Text files modified:
trunk/boost/spirit/home/qi/string/symbols.hpp | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/qi/string/symbols.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/string/symbols.hpp (original)
+++ trunk/boost/spirit/home/qi/string/symbols.hpp 2009-11-05 02:34:40 EST (Thu, 05 Nov 2009)
@@ -186,14 +186,35 @@
return *lookup->add(traits::get_begin<Char>(str)
, traits::get_end<Char>(str), T());
}
-
+
template <typename Str>
value_type* find(Str const& str)
{
- return lookup->find(traits::get_begin<Char>(str)
- , traits::get_end<Char>(str), T());
+ return find_impl(traits::get_begin<Char>(str)
+ , traits::get_end<Char>(str));
+ }
+
+ template <typename Str>
+ value_type const* find(Str const& str) const
+ {
+ return find_impl(traits::get_begin<Char>(str)
+ , traits::get_end<Char>(str));
+ }
+
+private:
+ template <typename Iterator>
+ value_type* find_impl(Iterator begin, Iterator end)
+ {
+ return lookup->find(begin, end, Filter());
+ }
+
+ template <typename Iterator>
+ value_type const* find_impl(Iterator begin, Iterator end) const
+ {
+ return lookup->find(begin, end, Filter());
}
+public:
template <typename Iterator, typename Context
, typename Skipper, typename Attribute>
bool parse(Iterator& first, Iterator const& last
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