Home | Libraries | People | FAQ | More |
namespace util { template <class C> struct is_lcase_letter; }
This is a lazy template metafunction that supports currying.
Checks if C
is a lower
case letter. Returns a boxed boolean value.
#include <boost/metaparse/util/is_lcase_letter.hpp>
The following expressions are equivalent:
is_lcase_letter<>::apply<boost::mpl::char_<'a'>>::type boost::mpl::true_ is_lcase_letter<>::apply<boost::mpl::char_<'z'>>::type boost::mpl::true_ is_lcase_letter<>::apply<c>::type boost::mpl::false_
#include <boost/metaparse/util/is_lcase_letter.hpp> #include <type_traits> using namespace boost::metaparse; struct returns_char { using type = std::integral_constant<char, 'a'>; }; static_assert( util::is_lcase_letter<std::integral_constant<char, 'a'>>::type::value, "a should be a lower case letter" ); static_assert( !util::is_lcase_letter<std::integral_constant<char, 'A'>>::type::value, "A should not be a lower case letter" ); static_assert( util::is_lcase_letter<>::type ::apply<std::integral_constant<char, 'a'>>::type::value, "it should support currying" ); static_assert( util::is_lcase_letter<returns_char>::type::value, "it should support lazy evaluation" );