2 [section is_whitespace]
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 whitespace character. Returns a boxed boolean value.
26 #include <boost/metaparse/util/is_whitespace.hpp>
28 [h1 Expression semantics]
30 For any `C` nullary template metafunction returning a wrapped character value
31 the following are equivalent:
33 is_whitespace<C>::type
34 is_whitespace<>::type::apply<C>::type
35 is_whitespace_c<C::type::value>::type
39 #include <boost/metaparse/util/is_whitespace.hpp>
41 #include <type_traits>
43 using namespace boost::metaparse;
47 using type = std::integral_constant<char, ' '>;
51 util::is_whitespace<std::integral_constant<char, ' '>>::type::value,
52 "a space should be a whitespace character"
56 !util::is_whitespace<std::integral_constant<char, '0'>>::type::value,
57 "a number should not be a whitespace character"
61 util::is_whitespace<>::type
62 ::apply<std::integral_constant<char, '\t'>>::type::value,
63 "it should support currying"
67 util::is_whitespace<returns_char>::type::value,
68 "it should support lazy evaluation"