annotate DEPENDENCIES/generic/include/boost/xpressive/detail/core/matcher/any_matcher.hpp @ 132:540eca98552e

Update qm-vamp-plugins metadata
author Chris Cannam
date Tue, 30 Jul 2019 12:06:51 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 ///////////////////////////////////////////////////////////////////////////////
Chris@16 2 // any_matcher.hpp
Chris@16 3 //
Chris@16 4 // Copyright 2008 Eric Niebler. Distributed under the Boost
Chris@16 5 // Software License, Version 1.0. (See accompanying file
Chris@16 6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7
Chris@16 8 #ifndef BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ANY_MATCHER_HPP_EAN_10_04_2005
Chris@16 9 #define BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ANY_MATCHER_HPP_EAN_10_04_2005
Chris@16 10
Chris@16 11 // MS compatible compilers support #pragma once
Chris@101 12 #if defined(_MSC_VER)
Chris@16 13 # pragma once
Chris@16 14 #endif
Chris@16 15
Chris@16 16 #include <boost/xpressive/detail/detail_fwd.hpp>
Chris@16 17 #include <boost/xpressive/detail/core/quant_style.hpp>
Chris@16 18 #include <boost/xpressive/detail/core/state.hpp>
Chris@16 19
Chris@16 20 namespace boost { namespace xpressive { namespace detail
Chris@16 21 {
Chris@16 22
Chris@16 23 ///////////////////////////////////////////////////////////////////////////////
Chris@16 24 // any_matcher
Chris@16 25 //
Chris@16 26 struct any_matcher
Chris@16 27 {
Chris@16 28 BOOST_XPR_QUANT_STYLE(quant_fixed_width, 1, true)
Chris@16 29
Chris@16 30 template<typename BidiIter, typename Next>
Chris@16 31 static bool match(match_state<BidiIter> &state, Next const &next)
Chris@16 32 {
Chris@16 33 if(state.eos())
Chris@16 34 {
Chris@16 35 return false;
Chris@16 36 }
Chris@16 37
Chris@16 38 ++state.cur_;
Chris@16 39 if(next.match(state))
Chris@16 40 {
Chris@16 41 return true;
Chris@16 42 }
Chris@16 43
Chris@16 44 --state.cur_;
Chris@16 45 return false;
Chris@16 46 }
Chris@16 47 };
Chris@16 48
Chris@16 49 }}}
Chris@16 50
Chris@16 51 #endif