1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 =============================================================================*/
7 #if !defined(SPIRIT_FAIL_FUNCTION_APRIL_22_2006_0159PM)
8 #define SPIRIT_FAIL_FUNCTION_APRIL_22_2006_0159PM
14 #include <boost/spirit/home/support/unused.hpp>
16 namespace boost { namespace spirit { namespace qi { namespace detail
18 template <typename Iterator, typename Context, typename Skipper>
21 typedef Iterator iterator_type;
22 typedef Context context_type;
25 Iterator& first_, Iterator const& last_
26 , Context& context_, Skipper const& skipper_)
34 template <typename Component, typename Attribute>
35 bool operator()(Component const& component, Attribute& attr) const
37 // return true if the parser fails
38 return !component.parse(first, last, context, skipper, attr);
41 template <typename Component>
42 bool operator()(Component const& component) const
44 // return true if the parser fails
45 return !component.parse(first, last, context, skipper, unused);
51 Skipper const& skipper;
54 // silence MSVC warning C4512: assignment operator could not be generated
55 fail_function& operator= (fail_function const&);