]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/xpressive/include/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / xpressive / include / boost / xpressive / detail / core / matcher / alternate_end_matcher.hpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // alternate_end_matcher.hpp
3 //
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)
7
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
10
11 // MS compatible compilers support #pragma once
12 #if defined(_MSC_VER)
13 # pragma once
14 # pragma warning(push)
15 # pragma warning(disable : 4100) // unreferenced formal parameter
16 #endif
17
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>
21
22 namespace boost { namespace xpressive { namespace detail
23 {
24
25 ///////////////////////////////////////////////////////////////////////////////
26 // alternate_end_matcher
27 //
28 struct alternate_end_matcher
29 : quant_style_assertion
30 {
31 mutable void const *back_;
32
33 alternate_end_matcher()
34 : back_(0)
35 {
36 }
37
38 template<typename BidiIter, typename Next>
39 bool match(match_state<BidiIter> &state, Next const &next) const
40 {
41 return next.pop_match(state, this->back_);
42 }
43 };
44
45 }}}
46
47 #if defined(_MSC_VER)
48 # pragma warning(pop)
49 #endif
50
51 #endif