diff options
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp index c1405d6..b8a51f3 100644 --- a/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp @@ -11,14 +11,15 @@ #endif #include <boost/spirit/home/support/unused.hpp> +#include <boost/mpl/bool.hpp> namespace boost { namespace spirit { namespace qi { namespace detail { template <typename Skipper> struct unused_skipper : unused_type { - unused_skipper(Skipper const& skipper) - : skipper(skipper) {} + unused_skipper(Skipper const& skipper_) + : skipper(skipper_) {} Skipper const& skipper; private: @@ -26,12 +27,24 @@ namespace boost { namespace spirit { namespace qi { namespace detail unused_skipper& operator= (unused_skipper const&); }; + template <typename Skipper> + struct is_unused_skipper + : mpl::false_ {}; + + template <typename Skipper> + struct is_unused_skipper<unused_skipper<Skipper> > + : mpl::true_ {}; + + template <> + struct is_unused_skipper<unused_type> + : mpl::true_ {}; + // If a surrounding lexeme[] directive was specified, the current - // skipper is of the type unused_skipper. In this case we + // skipper is of the type unused_skipper. In this case we // re-activate the skipper which was active before the skip[] // directive. template <typename Skipper> - inline Skipper const& + inline Skipper const& get_skipper(unused_skipper<Skipper> const& u) { return u.skipper; @@ -39,7 +52,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail // If no surrounding lexeme[] directive was specified we keep what we got. template <typename Skipper> - inline Skipper const& + inline Skipper const& get_skipper(Skipper const& u) { return u; |