1 ///////////////////////////////////////////////////////////////////////////////
2 // alternate_end_matcher.hpp
4 // Copyright 2008 Eric Niebler. Distributed under the Boost
5 // Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ALTERNATE_END_MATCHER_HPP_EAN_10_04_2005
9 #define BOOST_XPRESSIVE_DETAIL_CORE_MATCHER_ALTERNATE_END_MATCHER_HPP_EAN_10_04_2005
11 // MS compatible compilers support #pragma once
14 # pragma warning(push)
15 # pragma warning(disable : 4100) // unreferenced formal parameter
18 #include <boost/xpressive/detail/detail_fwd.hpp>
19 #include <boost/xpressive/detail/core/quant_style.hpp>
20 #include <boost/xpressive/detail/core/state.hpp>
22 namespace boost { namespace xpressive { namespace detail
25 ///////////////////////////////////////////////////////////////////////////////
26 // alternate_end_matcher
28 struct alternate_end_matcher
29 : quant_style_assertion
31 mutable void const *back_;
33 alternate_end_matcher()
38 template<typename BidiIter, typename Next>
39 bool match(match_state<BidiIter> &state, Next const &next) const
41 return next.pop_match(state, this->back_);