int_to_digit_c.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef BOOST_METAPARSE_V1_UTIL_INT_TO_DIGIT_C_HPP
  2. #define BOOST_METAPARSE_V1_UTIL_INT_TO_DIGIT_C_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/mpl/char.hpp>
  8. namespace boost
  9. {
  10. namespace metaparse
  11. {
  12. namespace v1
  13. {
  14. namespace util
  15. {
  16. template <int N>
  17. struct int_to_digit_c;
  18. template <> struct int_to_digit_c<0> : boost::mpl::char_<'0'> {};
  19. template <> struct int_to_digit_c<1> : boost::mpl::char_<'1'> {};
  20. template <> struct int_to_digit_c<2> : boost::mpl::char_<'2'> {};
  21. template <> struct int_to_digit_c<3> : boost::mpl::char_<'3'> {};
  22. template <> struct int_to_digit_c<4> : boost::mpl::char_<'4'> {};
  23. template <> struct int_to_digit_c<5> : boost::mpl::char_<'5'> {};
  24. template <> struct int_to_digit_c<6> : boost::mpl::char_<'6'> {};
  25. template <> struct int_to_digit_c<7> : boost::mpl::char_<'7'> {};
  26. template <> struct int_to_digit_c<8> : boost::mpl::char_<'8'> {};
  27. template <> struct int_to_digit_c<9> : boost::mpl::char_<'9'> {};
  28. }
  29. }
  30. }
  31. }
  32. #endif