diff options
Diffstat (limited to 'boost/spirit/home/x3/string/detail/tst.hpp')
-rw-r--r-- | boost/spirit/home/x3/string/detail/tst.hpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/boost/spirit/home/x3/string/detail/tst.hpp b/boost/spirit/home/x3/string/detail/tst.hpp index df61f4dec7..50f6df6a95 100644 --- a/boost/spirit/home/x3/string/detail/tst.hpp +++ b/boost/spirit/home/x3/string/detail/tst.hpp @@ -7,13 +7,8 @@ #if !defined(BOOST_SPIRIT_X3_TST_MARCH_09_2007_0905AM) #define BOOST_SPIRIT_X3_TST_MARCH_09_2007_0905AM -#if defined(_MSC_VER) -#pragma once -#endif - #include <boost/call_traits.hpp> #include <boost/detail/iterator.hpp> -#include <boost/foreach.hpp> #include <boost/assert.hpp> namespace boost { namespace spirit { namespace x3 { namespace detail @@ -61,9 +56,9 @@ namespace boost { namespace spirit { namespace x3 { namespace detail return 0; } - template <typename Iterator, typename Filter> + template <typename Iterator, typename CaseCompare> static T* - find(tst_node* start, Iterator& first, Iterator last, Filter filter) + find(tst_node* start, Iterator& first, Iterator last, CaseCompare comp) { if (first == last) return 0; @@ -75,11 +70,8 @@ namespace boost { namespace spirit { namespace x3 { namespace detail while (p && i != last) { - typename - boost::detail::iterator_traits<Iterator>::value_type - c = filter(*i); // filter only the input - - if (c == p->id) + int32_t c = comp(*i,p->id); + if (c == 0) { if (p->data) { @@ -89,7 +81,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail p = p->eq; i++; } - else if (c < p->id) + else if (c < 0) { p = p->lt; } @@ -117,7 +109,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail return 0; tst_node** pp = &start; - for(;;) + for (;;) { typename boost::detail::iterator_traits<Iterator>::value_type |