[#one_of_c] [section one_of_c] [h1 Synopsis] template struct one_of_c; This is a [link parser parser]. [table Arguments [[Name] [Type]] [[`Cs`] [character values]] ] [h1 Description] It accepts inputs beginning with any of the `Cs...` characters. The result of parsing is the first character of the input. On compilers, which are not C++11-compliant, the maximum number of characters that can be provided is defined by the `BOOST_METAPARSE_LIMIT_ONE_OF_SIZE` macro. Its default value is `20`. [h1 Header] #include [h1 Expression semantics] For any `c1`, ..., `cn` characters one_of_c is equivalent to one_of, /* ... */, lit_c> [h1 Example] #include #include #include #include #include using namespace boost::metaparse; using whitespace = one_of_c<' ', '\n', '\r', '\t', '\v'>; static_assert( get_result< whitespace::apply >::type::value == ' ', "the result of parsing should be the first character of the input" ); static_assert( is_error>::type::value, "it should return an error when the input does not begin with a whitespace" ); [endsect]