File indexing completed on 2025-01-18 09:40:49
0001 #ifndef BOOST_METAPARSE_V1_UTIL_DIGIT_TO_INT_C_HPP
0002 #define BOOST_METAPARSE_V1_UTIL_DIGIT_TO_INT_C_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/metaparse/v1/error/digit_expected.hpp>
0010
0011 #include <boost/mpl/int.hpp>
0012
0013 namespace boost
0014 {
0015 namespace metaparse
0016 {
0017 namespace v1
0018 {
0019 namespace util
0020 {
0021 template <char C>
0022 struct digit_to_int_c : error::digit_expected {};
0023
0024 template <> struct digit_to_int_c<'0'> : boost::mpl::int_<0> {};
0025 template <> struct digit_to_int_c<'1'> : boost::mpl::int_<1> {};
0026 template <> struct digit_to_int_c<'2'> : boost::mpl::int_<2> {};
0027 template <> struct digit_to_int_c<'3'> : boost::mpl::int_<3> {};
0028 template <> struct digit_to_int_c<'4'> : boost::mpl::int_<4> {};
0029 template <> struct digit_to_int_c<'5'> : boost::mpl::int_<5> {};
0030 template <> struct digit_to_int_c<'6'> : boost::mpl::int_<6> {};
0031 template <> struct digit_to_int_c<'7'> : boost::mpl::int_<7> {};
0032 template <> struct digit_to_int_c<'8'> : boost::mpl::int_<8> {};
0033 template <> struct digit_to_int_c<'9'> : boost::mpl::int_<9> {};
0034 }
0035 }
0036 }
0037 }
0038
0039 #endif
0040