Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:47:55

0001 //  Copyright (c) 2001-2011 Hartmut Kaiser
0002 // 
0003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
0004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #if !defined(BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM)
0007 #define BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/mpl/bool.hpp>
0014 #include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp>
0015 
0016 namespace boost { namespace spirit { namespace traits
0017 {
0018     // declare special functions allowing to integrate any multi_pass iterator
0019     // with expectation points
0020 
0021     // normal iterators require no special handling
0022     BOOST_SCOPED_ENUM_START(clear_mode) 
0023     {
0024         clear_if_enabled,
0025         clear_always
0026     };
0027     BOOST_SCOPED_ENUM_END
0028 
0029     template <typename Iterator>
0030     void clear_queue(Iterator&
0031       , BOOST_SCOPED_ENUM(clear_mode) /*mode*/ = clear_mode::clear_if_enabled) 
0032     {}
0033 
0034     template <typename Iterator>
0035     void inhibit_clear_queue(Iterator&, bool) 
0036     {}
0037 
0038     template <typename Iterator>
0039     bool inhibit_clear_queue(Iterator&) 
0040     { 
0041         return false; 
0042     }
0043 
0044     // Helper template to recognize a multi_pass iterator. This specialization
0045     // will be instantiated for any non-multi_pass iterator.
0046     template <typename Iterator>
0047     struct is_multi_pass : mpl::false_ {};
0048 
0049 }}}
0050 
0051 #endif
0052