is_whitespace_c.hpp 859 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef BOOST_METAPARSE_V1_UTIL_IS_WHITESPACE_C_HPP
  2. #define BOOST_METAPARSE_V1_UTIL_IS_WHITESPACE_C_HPP
  3. // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
  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/mpl/bool.hpp>
  8. namespace boost
  9. {
  10. namespace metaparse
  11. {
  12. namespace v1
  13. {
  14. namespace util
  15. {
  16. template <char C>
  17. struct is_whitespace_c : boost::mpl::false_ {};
  18. template <> struct is_whitespace_c<' '> : boost::mpl::true_ {};
  19. template <> struct is_whitespace_c<'\r'> : boost::mpl::true_ {};
  20. template <> struct is_whitespace_c<'\n'> : boost::mpl::true_ {};
  21. template <> struct is_whitespace_c<'\t'> : boost::mpl::true_ {};
  22. }
  23. }
  24. }
  25. }
  26. #endif