is_letter.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef BOOST_METAPARSE_V1_UTIL_IS_LETTER_HPP
  2. #define BOOST_METAPARSE_V1_UTIL_IS_LETTER_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2010.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #include <boost/metaparse/v1/util/is_ucase_letter.hpp>
  8. #include <boost/metaparse/v1/util/is_lcase_letter.hpp>
  9. #include <boost/mpl/bool.hpp>
  10. #include <boost/mpl/vector.hpp>
  11. namespace boost
  12. {
  13. namespace metaparse
  14. {
  15. namespace v1
  16. {
  17. namespace util
  18. {
  19. template <class C = boost::mpl::na>
  20. struct is_letter :
  21. boost::mpl::bool_<
  22. is_lcase_letter<C>::type::value || is_ucase_letter<C>::type::value
  23. >
  24. {};
  25. template <>
  26. struct is_letter<boost::mpl::na>
  27. {
  28. typedef is_letter type;
  29. template <class C = boost::mpl::na>
  30. struct apply : is_letter<C> {};
  31. };
  32. }
  33. }
  34. }
  35. }
  36. #endif