1 // Copyright (c) 2001-2011 Hartmut Kaiser
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #if !defined(BOOST_SPIRIT_QI_UNUSED_SKIPPER_JUL_25_2009_0921AM)
7 #define BOOST_SPIRIT_QI_UNUSED_SKIPPER_JUL_25_2009_0921AM
13 #include <boost/spirit/home/support/unused.hpp>
14 #include <boost/mpl/bool.hpp>
16 namespace boost { namespace spirit { namespace qi { namespace detail
18 template <typename Skipper>
19 struct unused_skipper : unused_type
21 unused_skipper(Skipper const& skipper_)
22 : skipper(skipper_) {}
23 Skipper const& skipper;
26 // silence MSVC warning C4512: assignment operator could not be generated
27 unused_skipper& operator= (unused_skipper const&);
30 template <typename Skipper>
31 struct is_unused_skipper
34 template <typename Skipper>
35 struct is_unused_skipper<unused_skipper<Skipper> >
39 struct is_unused_skipper<unused_type>
42 // If a surrounding lexeme[] directive was specified, the current
43 // skipper is of the type unused_skipper. In this case we
44 // re-activate the skipper which was active before the skip[]
46 template <typename Skipper>
48 get_skipper(unused_skipper<Skipper> const& u)
53 // If no surrounding lexeme[] directive was specified we keep what we got.
54 template <typename Skipper>
56 get_skipper(Skipper const& u)