fail_tag.hpp 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef BOOST_METAPARSE_V1_FAIL_TAG_HPP
  2. #define BOOST_METAPARSE_V1_FAIL_TAG_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2012.
  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_message.hpp>
  8. #include <boost/metaparse/v1/fwd/get_position.hpp>
  9. #include <iostream>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. struct fail_tag { typedef fail_tag type; };
  17. template <>
  18. struct get_message_impl<fail_tag>
  19. {
  20. template <class A>
  21. struct apply { typedef typename A::message type; };
  22. };
  23. template <>
  24. struct get_position_impl<fail_tag>
  25. {
  26. template <class A>
  27. struct apply : A::source_position {};
  28. };
  29. }
  30. }
  31. }
  32. #endif