[#one_char_except_c] [section one_char_except_c] [h1 Synopsis] template struct one_char_except_c; This is a [link parser parser]. [table Arguments [[Name] [Type]] [[`Cs`] [character values]] ] [h1 Description] `one_char_except_c` accepts one character except any of `Cs`. When the input is empty or begins with one of the non-accepted characters, `one_char_except_c` rejects the input. Otherwise it accepts the input and the result of parsing is the character value. On compilers, which are not C++11-compliant, the maximum number of characters this class can have is the value the macro `BOOST_METAPARSE_LIMIT_ONE_CHAR_EXCEPT_SIZE` expands to. Its default value is 10. [h1 Header] #include [h1 Expression semantics] For any `s` compile-time string and `c1`, ..., `cn` characters the following are equivalent one_char_except_c::apply boost::metaparse::one_char::apply when `s` is empty or it begins with a character other than `c1`, ..., `cn`. Otherwise `one_char_except_c::appl` returns a parsing error. [h1 Example] #include #include #include #include #include #include #include #include #include #include using namespace boost::metaparse; using string_literal_parser = middle_of, repeated>, lit_c<'"'>>; static_assert( boost::mpl::equal< boost::mpl::vector< boost::mpl::char_<'h'>, boost::mpl::char_<'e'>, boost::mpl::char_<'l'>, boost::mpl::char_<'l'>, boost::mpl::char_<'o'> >, get_result< string_literal_parser::apply >::type >::type::value, "it should return the content of the string literal" ); [endsect]