entire_input.hpp 837 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef BOOST_METAPARSE_V1_ENTIRE_INPUT_HPP
  2. #define BOOST_METAPARSE_V1_ENTIRE_INPUT_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2011.
  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/first_of.hpp>
  8. #include <boost/metaparse/v1/empty.hpp>
  9. #include <boost/metaparse/v1/change_error_message.hpp>
  10. namespace boost
  11. {
  12. namespace metaparse
  13. {
  14. namespace v1
  15. {
  16. template <class P, class Msg = error::end_of_input_expected>
  17. struct entire_input :
  18. first_of<P, change_error_message<empty<void>, Msg> >
  19. {};
  20. template <class P>
  21. struct entire_input<P, error::end_of_input_expected> :
  22. first_of<P, empty<void> >
  23. {};
  24. }
  25. }
  26. }
  27. #endif