1 // Copyright (c) 2001-2011 Hartmut Kaiser
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #if !defined(BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM)
7 #define BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM
13 #include <boost/mpl/bool.hpp>
14 #include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp>
16 namespace boost { namespace spirit { namespace traits
18 // declare special functions allowing to integrate any multi_pass iterator
19 // with expectation points
21 // normal iterators require no special handling
22 BOOST_SCOPED_ENUM_START(clear_mode)
29 template <typename Iterator>
30 void clear_queue(Iterator&
31 , BOOST_SCOPED_ENUM(clear_mode) /*mode*/ = clear_mode::clear_if_enabled)
34 template <typename Iterator>
35 void inhibit_clear_queue(Iterator&, bool)
38 template <typename Iterator>
39 bool inhibit_clear_queue(Iterator&)
44 // Helper template to recognize a multi_pass iterator. This specialization
45 // will be instantiated for any non-multi_pass iterator.
46 template <typename Iterator>
47 struct is_multi_pass : mpl::false_ {};