Home | Libraries | People | FAQ | More |
namespace util { template <char C> struct is_whitespace_c; }
This is a template class similar to a template
metafunction but taking a char
value as argument.
Checks if C
is a whitespace
character. Returns a boxed boolean value.
#include <boost/metaparse/util/is_whitespace_c.hpp>
The following expressions are equivalent:
is_whitespace_c<' '>::type boost::mpl::true_ is_whitespace_c<'\t'>::type boost::mpl::true_ is_whitespace_c<'\r'>::type boost::mpl::true_ is_whitespace_c<'\n'>::type boost::mpl::true_
For any c
character other
than the above listed ones the following are equivalent:
is_whitespace_c<c>::type boost::mpl::false_
#include <boost/metaparse/util/is_whitespace_c.hpp> #include <type_traits> using namespace boost::metaparse; static_assert( util::is_whitespace_c<' '>::type::value, "a space should be a whitespace character" ); static_assert( !util::is_whitespace_c<'0'>::type::value, "a number should not be a whitespace character" );