accept_tag.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef BOOST_METAPARSE_V1_ACCEPT_TAG_HPP
  2. #define BOOST_METAPARSE_V1_ACCEPT_TAG_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <boost/metaparse/v1/fwd/get_remaining.hpp>
  8. #include <boost/metaparse/v1/fwd/get_position.hpp>
  9. #include <boost/metaparse/v1/fwd/get_result.hpp>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. struct accept_tag { typedef accept_tag type; };
  17. template <>
  18. struct get_position_impl<accept_tag>
  19. {
  20. template <class A>
  21. struct apply : A::source_position {};
  22. };
  23. template <>
  24. struct get_remaining_impl<accept_tag>
  25. {
  26. template <class A>
  27. struct apply : A::remaining {};
  28. };
  29. template <>
  30. struct get_result_impl<accept_tag>
  31. {
  32. template <class A>
  33. struct apply { typedef typename A::result type; };
  34. };
  35. }
  36. }
  37. }
  38. #endif