]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/metaparse/doc/is_lcase_letter.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / metaparse / doc / is_lcase_letter.qbk
CommitLineData
7c673cae
FG
1[#is_lcase_letter]
2[section is_lcase_letter]
3
4[h1 Synopsis]
5
6 namespace util
7 {
8 template <class C>
9 struct is_lcase_letter;
10 }
11
12This is a [link lazy_metafunction lazy template metafunction] that supports
13[link currying currying].
14
15[table Arguments
16 [[Name] [Type]]
17 [[`C`] [[link boxed_value boxed] character value]]
18]
19
20[h1 Description]
21
22Checks if `C` is a lower case letter. Returns a boxed boolean value.
23
24[h1 Header]
25
26 #include <boost/metaparse/util/is_lcase_letter.hpp>
27
28[h1 Expression semantics]
29
30The following expressions are equivalent:
31
32 is_lcase_letter<>::apply<boost::mpl::char_<'a'>>::type
33 boost::mpl::true_
34
35 is_lcase_letter<>::apply<boost::mpl::char_<'z'>>::type
36 boost::mpl::true_
37
38 is_lcase_letter<>::apply<c>::type
39 boost::mpl::false_
40
41[h1 Example]
42
43 #include <boost/metaparse/util/is_lcase_letter.hpp>
44
45 #include <type_traits>
46
47 using namespace boost::metaparse;
48
49 struct returns_char
50 {
51 using type = std::integral_constant<char, 'a'>;
52 };
53
54 static_assert(
55 util::is_lcase_letter<std::integral_constant<char, 'a'>>::type::value,
56 "a should be a lower case letter"
57 );
58
59 static_assert(
60 !util::is_lcase_letter<std::integral_constant<char, 'A'>>::type::value,
61 "A should not be a lower case letter"
62 );
63
64 static_assert(
65 util::is_lcase_letter<>::type
66 ::apply<std::integral_constant<char, 'a'>>::type::value,
67 "it should support currying"
68 );
69
70 static_assert(
71 util::is_lcase_letter<returns_char>::type::value,
72 "it should support lazy evaluation"
73 );
74
75
76[endsect]
77