12 This is a [link lazy_metafunction lazy template metafunction] that supports
13 [link currying currying].
17 [[`D`] [[link boxed_value boxed] integer value]]
22 Converts a boxed integer value in the range `[0-9]` to a character representing
27 #include <boost/metaparse/util/int_to_digit.hpp>
29 [h1 Expression semantics]
31 The following pairs of expressions are equivalent
33 int_to_digit<boost::mpl::int_<0>>::type
34 boost::mpl::char_<'0'>
36 int_to_digit<boost::mpl::int_<9>>::type
37 boost::mpl::char_<'9'>
41 #include <boost/metaparse/util/int_to_digit.hpp>
43 #include <type_traits>
45 using namespace boost::metaparse;
47 struct nullary_metafunction_returning_4
49 using type = std::integral_constant<int, 4>;
53 util::int_to_digit<std::integral_constant<int, 0>>::type::value == '0',
54 "it should convert an integer value to the corresponding character"
58 util::int_to_digit<>::type
59 ::apply<std::integral_constant<int, 7>>::type::value == '7',
60 "it should support currying"
64 util::int_to_digit<nullary_metafunction_returning_4>::type::value == '4',
65 "it should support lazy evaluation"