12 This is a [link lazy_metafunction lazy template metafunction] that supports
13 [link currying currying].
17 [[`C`] [[link boxed_value boxed] character value]]
22 Checks if `C` is a digit value or not. Returns a boxed boolean value.
26 #include <boost/metaparse/util/is_digit.hpp>
28 [h1 Expression semantics]
30 The following expressions are equivalent:
32 is_digit<boost::mpl::char_<'0'>>::type
33 is_digit<>::apply<boost::mpl::char_<'0'>>::type
36 The following expressions are also equivalent:
38 is_digit<>::apply<c>::type
43 #include <boost/metaparse/util/is_digit.hpp>
45 #include <type_traits>
47 using namespace boost::metaparse;
51 using type = std::integral_constant<char, '0'>;
55 util::is_digit<std::integral_constant<char, '0'>>::type::value,
56 "digit character should be a digit"
60 !util::is_digit<std::integral_constant<char, 'x'>>::type::value,
61 "letter should not be a digit"
65 util::is_digit<>::type::apply<std::integral_constant<char, '0'>>::type::value,
66 "it should support currying"
70 util::is_digit<returns_char>::type::value,
71 "it should support lazy evaluation"