1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM)
8 #define BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM
14 #include <boost/spirit/home/support/unused.hpp>
15 #include <boost/spirit/home/qi/detail/unused_skipper.hpp>
17 namespace boost { namespace spirit { namespace qi
19 ///////////////////////////////////////////////////////////////////////////
20 // Move the /first/ iterator to the first non-matching position
21 // given a skip-parser. The function is a no-op if unused_type is
22 // passed as the skip-parser.
23 ///////////////////////////////////////////////////////////////////////////
24 template <typename Iterator, typename T>
25 inline void skip_over(Iterator& first, Iterator const& last, T const& skipper)
27 while (first != last && skipper.parse(first, last, unused, unused, unused))
31 template <typename Iterator>
32 inline void skip_over(Iterator&, Iterator const&, unused_type)
36 template <typename Iterator, typename Skipper>
37 inline void skip_over(Iterator&, Iterator const&
38 , detail::unused_skipper<Skipper> const&)