digit.hpp 828 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef BOOST_METAPARSE_V1_DIGIT_HPP
  2. #define BOOST_METAPARSE_V1_DIGIT_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2010.
  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/error/digit_expected.hpp>
  8. #include <boost/metaparse/v1/accept_when.hpp>
  9. #include <boost/metaparse/v1/one_char.hpp>
  10. #include <boost/metaparse/v1/change_error_message.hpp>
  11. #include <boost/metaparse/v1/util/is_digit.hpp>
  12. namespace boost
  13. {
  14. namespace metaparse
  15. {
  16. namespace v1
  17. {
  18. typedef
  19. accept_when<
  20. change_error_message<one_char, error::digit_expected>,
  21. util::is_digit<>,
  22. error::digit_expected
  23. >
  24. digit;
  25. }
  26. }
  27. }
  28. #endif