Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/spirit/home/support/multi_pass_wrapper.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | 2665513ce2d3 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright (c) 2001-2011 Hartmut Kaiser |
Chris@16 | 2 // |
Chris@16 | 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 5 |
Chris@16 | 6 #if !defined(BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM) |
Chris@16 | 7 #define BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM |
Chris@16 | 8 |
Chris@16 | 9 #if defined(_MSC_VER) |
Chris@16 | 10 #pragma once |
Chris@16 | 11 #endif |
Chris@16 | 12 |
Chris@16 | 13 #include <boost/mpl/bool.hpp> |
Chris@16 | 14 #include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp> |
Chris@16 | 15 |
Chris@16 | 16 namespace boost { namespace spirit { namespace traits |
Chris@16 | 17 { |
Chris@16 | 18 // declare special functions allowing to integrate any multi_pass iterator |
Chris@16 | 19 // with expectation points |
Chris@16 | 20 |
Chris@16 | 21 // normal iterators require no special handling |
Chris@16 | 22 BOOST_SCOPED_ENUM_START(clear_mode) |
Chris@16 | 23 { |
Chris@16 | 24 clear_if_enabled, |
Chris@16 | 25 clear_always |
Chris@16 | 26 }; |
Chris@16 | 27 BOOST_SCOPED_ENUM_END |
Chris@16 | 28 |
Chris@16 | 29 template <typename Iterator> |
Chris@16 | 30 void clear_queue(Iterator& |
Chris@16 | 31 , BOOST_SCOPED_ENUM(clear_mode) /*mode*/ = clear_mode::clear_if_enabled) |
Chris@16 | 32 {} |
Chris@16 | 33 |
Chris@16 | 34 template <typename Iterator> |
Chris@16 | 35 void inhibit_clear_queue(Iterator&, bool) |
Chris@16 | 36 {} |
Chris@16 | 37 |
Chris@16 | 38 template <typename Iterator> |
Chris@16 | 39 bool inhibit_clear_queue(Iterator&) |
Chris@16 | 40 { |
Chris@16 | 41 return false; |
Chris@16 | 42 } |
Chris@16 | 43 |
Chris@16 | 44 // Helper template to recognize a multi_pass iterator. This specialization |
Chris@16 | 45 // will be instantiated for any non-multi_pass iterator. |
Chris@16 | 46 template <typename Iterator> |
Chris@16 | 47 struct is_multi_pass : mpl::false_ {}; |
Chris@16 | 48 |
Chris@16 | 49 }}} |
Chris@16 | 50 |
Chris@16 | 51 #endif |
Chris@16 | 52 |