1[#is_ucase_letter] 2[section is_ucase_letter] 3 4[h1 Synopsis] 5 6 namespace util 7 { 8 template <class C> 9 struct is_ucase_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 an upper case letter. Returns a boxed boolean value. 23 24[h1 Header] 25 26 #include <boost/metaparse/util/is_ucase_letter.hpp> 27 28[h1 Expression semantics] 29 30The following expressions are equivalent: 31 32 is_ucase_letter<>::apply<boost::mpl::char_<'A'>>::type 33 boost::mpl::true_ 34 35 is_ucase_letter<>::apply<boost::mpl::char_<'Z'>>::type 36 boost::mpl::true_ 37 38 is_ucase_letter<>::apply<c>::type 39 boost::mpl::false_ 40 41[h1 Example] 42 43 #include <boost/metaparse/util/is_ucase_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_ucase_letter<std::integral_constant<char, 'A'>>::type::value, 56 "A should be an upper case letter" 57 ); 58 59 static_assert( 60 !util::is_ucase_letter<std::integral_constant<char, 'a'>>::type::value, 61 "a should not be an upper case letter" 62 ); 63 64 static_assert( 65 util::is_ucase_letter<>::type 66 ::apply<std::integral_constant<char, 'A'>>::type::value, 67 "it should support currying" 68 ); 69 70 static_assert( 71 util::is_ucase_letter<returns_char>::type::value, 72 "it should support lazy evaluation" 73 ); 74 75[endsect] 76 77