[#first_of] [section first_of] [h1 Synopsis] template struct first_of; This is a [link parser_combinator parser combinator]. [table Arguments [[Name] [Type]] [[`Ps`] [[link parser parser]s]] ] [h1 Description] `first_of` applies the `Ps...` parsers in sequence. It accepts an input when all parsers accept it. The result of parsing is the result of the first parser. On compilers, which are not C++11-compliant, the maximum number of parsers `first_of` accepts can be specified with the `BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE` macro. Its default value is `5`. [h1 Header] #include [h1 Expression semantics] For any `p1`, ... `pn` parsers first_of is equivalent to nth_of_c<0, p1, ..., pn> [h1 Example] #include #include #include #include #include #include #include #include using namespace boost::metaparse; using int_with_semicolon = first_of>; static_assert( is_error< int_with_semicolon::apply >::type::value, "int without semicolon is rejected" ); static_assert( get_result< int_with_semicolon::apply >::type::value, "the result is the result of the first parser" ); [endsect]