next_digit.hpp 769 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_METAPARSE_V1_IMPL_NEXT_DIGIT_HPP
  2. #define BOOST_METAPARSE_V1_IMPL_NEXT_DIGIT_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015.
  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/mpl/int.hpp>
  8. namespace boost
  9. {
  10. namespace metaparse
  11. {
  12. namespace v1
  13. {
  14. namespace impl
  15. {
  16. struct next_digit
  17. {
  18. typedef next_digit type;
  19. template <class PartialResult, class NextDigit>
  20. struct apply :
  21. boost::mpl::int_<
  22. PartialResult::type::value * 10 + NextDigit::type::value
  23. >
  24. {};
  25. };
  26. }
  27. }
  28. }
  29. }
  30. #endif